Partager via


StartProfile

This function increments the start/stop counter for the specified profiling level.

int StartProfile(
  int nLevel,
  DWORD dwID 
);

Parameters

  • nLevel
    Level of execution of the identifier specified in the dwID parameter.

    The following table shows possible values for the nLevel parameter.

    Value Description
    PROFILE_GLOBALLEVEL Global level settings affect all processes and threads in the profiling run.
    PROFILE_PROCESSLEVEL Process level settings affect all threads that are part of the process specified by the dwId parameter.
    PROFILE_THREADLEVEL Thread profiling level settings affect the thread specified by the dwId parameter.
  • dwID
    Element to which the function applies. For a global-level element, use only the PROFILE_CURRENTID value. To specify a current process or thread, use PROFILE_CURRENTID value. To specify a process or thread other than the current process or thread, use the identifier for the process or thread generated by the system.

Return Values

The following table shows the values that this function returns.

Value Description
PROFILE_OK The call was successful.
PROFILE_ERROR_NOT_YET_IMPLEMENTED The profiling function call, profiling level, or combination of call and level is not implemented.
PROFILE_ERROR_MODE_NEVER The profiling mode was set to NEVER when the function was called.
PROFILE_ERROR_LEVEL_NO_EXIST The profiling level specified by the nLevel parameter does not exist.
PROFILE_ERROR_ID_NO_EXIST The profiling element specified by the dwId parameter does not exist.

Remarks

The StartProfile function and the StopProfile function control the start/stop counter for the profiling level. The default value for the start/stop counter is one.

When the start/stop count is greater than zero, the start/stop state for the profiling level is ON. When the count is less than or equal to zero, the start/stop state is OFF.

When the start/stop state and the suspend/resume state are both ON, the profiling state for the level is ON. For a thread to be profiled, the global, process, and thread level states for the thread must be ON.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Cecap.h.
Link Library: Cecap.lib.

See Also

Remote Call Profiler Data Collection Functions | StopProfile | Remote Call Profiler Data Collection API Reference | Data Collection Control

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.