Compartilhar via


Adding a Data Control Function to a Module (Windows CE 5.0)

Send Feedback

By default, the Remote Call Profiler logger begins writing data to an .icp file when an instrumented module starts, and continues logging until the last instrumented process unloads.

You can use the Remote Call Profiler data collection functions in your code to start and stop data collection. For more information, see Remote Call Profiler Data Collection Functions.

  1. In the module, insert a #include cecap.h statement.

  2. In your code, insert a StartProfile(ProfileLevel, PROFILE_CURRENTID); statement to start or restart data collection.

    - or -

    In your code, insert a StopProfile(ProfileLevel, PROFILE_CURRENTID); to stop data collection.

  3. In the statement, replace ProfileLevel with a constant.

    The following table shows acceptable values for ProfileLevel.

    Constant Description
    PROFILE_GLOBALLEVEL Applies to all processes and threads in a cross-process profiling scenario
    PROFILE_PROCESSLEVEL Applies to all threads in the current process
    PROFILE_THREADLEVEL Applies to the current thread

    Note   The PROFILE_CURRENTID constant identifies the current thread or process. By default, profiling is enabled for all levels of profiling. You can stop profiling at a given scope with one function call. To start or resume profiling, ensure that all three profiling levels are enabled.

See Also

Remote Call Profiler Data Collection API Reference | Remote Call Profiler Instrumented Module Building

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.