InitializeStressModule

This function initializes a test module. The Modular Stress Test harness calls this function after the test module loads.

BOOL InitializeStressModule(
  MODULE_PARAMS* pmp,
  UINT* pnThreads
);

Parameters

  • pmp
    [in] Pointer to the parameter information for the module passed in by the harness. The harness handles most of the parameters, but you can retrieve the command line for the module from the MODULE_PARAMS structure.
  • pnThreads
    [out] Pointer to a value that represents the number of test threads that you want your module to run. The container that loads the test module manages the lifetime of these threads. Each thread calls your DoStressIteration function in a loop.

Return Values

This function should return TRUE if the function call is successful. If the function returns FALSE, the harness unloads the test module and aborts the test.

Remarks

The harness requires that you implement and export this function in a custom test module.

The test harness passes to this function a pointer to the MODULE_PARAMS structure. From the test module, you must call the InitializeStressUtils function and pass the pointer to the MODULE_PARAMS structure to the InitializeStressUtils function.

You can use this function to initialize a specific test. You can initialize the value pointed to by the pnThreads parameter to request threads to call your DoStressIteration function. If you ignore the pnThreads parameter, your module is single-threaded.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Developer defined.
Link Library: Developer implemented.

See Also

Custom Stress Module Functions | Custom Module Creation for the Modular Stress Test

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.