Share via


InitializeStressModule

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

This function initializes a test module. The Windows Embedded CE Stress tool harness calls this function after the test module loads.

Syntax

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

Parameters

  • pmp
    [in] Pointer to the parameter information for the test module passed in by the harness. The harness handles most of the parameters, but you can retrieve the command line for the test module from the MODULE_PARAMS structure.
  • pnThreads
    [out] Pointer to a value that represents the number of test threads that you want your test 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 Value

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 test module is single-threaded.

Requirements

Header Developer Implemented
Library Developer Implemented
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Other Resources

Custom Stress Module Functions