Share via


Register Debug Zones (Compact 2013)

3/26/2014

After you set up debug zones in your code as described in Define Debug Zones and Set Debug Zone Parameters, you need to add code to register the debug zones with the kernel debugger. After you register the debug zones with the kernel debugger, you can turn them on or off programmatically or by using Platform Builder as described in Change Active Debug Zones.

To register a debug zone

  1. Call one of the following macros from the main function of your process or from the DllMain entry point of your DLL, as shown in the following table.

    Macro

    Purpose

    DEBUGREGISTER

    Registers debug zones for your module only on Debug builds

    RETAILREGISTERZONES

    Registers debug zones on Debug and Retail builds

    For more information about these macros, see DEBUGREGISTER, RETAILREGISTERZONES.

  2. These macros take one parameter, hMod. Provide the parameter, as shown below.

    If the module type is…

    Use parameter

    Example code

    EXE

    NULL

    DEBUGREGISTER(NULL);

    DLL

    Handle to the module

    DEBUGREGISTER(hInstDLL);

See Also

Concepts

Use Debug Zones
Kernel Debugger
Debugging

Other Resources

Windows Embedded Compact 2013