Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

These macros register the current module (a DLL or process) and its associated debug zone with the kernel subsystem.

  • DEBUGREGISTERregisters debug zones for your process or module only on Debug builds.

  • RETAILREGISTERZONESregisters debug zones on Debug and Retail builds.

To always register debug zones, regardless of what build settings that you use, use the RegisterDbgZonesfunction.

Syntax

DEBUGREGISTER (
hMod) 
RETAILREGISTERZONES  (
hMod) 

Parameters

hMod

Module handle.

Return Value

None.

Remarks

Any module (a DLL or process) can register an associated debug zone mask that uses this macro with the kernel debug subsystem. Once the debug zones are registered, a user can then turn debug zones on or off programmatically .

Debug zones may also be turned on or off interactively from the Target Controlwindow. You can interactively turn debug zones on or off by modifying bits of the registered debug zone mask.

You can call one of these macros from the main function of your process, or from the DllMainentry point of your DLL. For example, from the main function of a process, you might call:

Copy Code
 DEBUGREGISTER(NULL);

Alternatively, from the entry point of a DLL, call:

Copy Code
 DEBUGREGISTER(hInstDLL);

Where hInstDLLis the instance value that was passed to DllMain.

The design of this macro assumes that a global variable dpCurSettingshas already been defined, where dpCurSettingsmust be a DBGPARAMstructure.

Requirements

Header dbgapi.h
Windows Embedded CE Windows CE 2.10 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

DEBUGZONE