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. |
This function is called by the DEBUGREGISTERand RETAILREGISTERZONESmacros to register debug zone settings for a process or DLL.
Syntax
BOOL RegisterDbgZones( HMODULE hMod, LPDBGPARAM lpdbgparam ); |
Parameters
- hMod
-
Handle for module
- lpdbgparam
-
Parameters
Return Value
Returns TRUE if the debug zones were successfully registered.
Remarks
Call this function from the main function of your process, or from the DllMainentry point of your DLL. For example, from the main function of a process, call:
Copy Code | |
---|---|
RegisterDbgZones(NULL, &dpCurSettings); |
From the entry point of a DLL, call:
Copy Code | |
---|---|
RegisterDbgZones(hInstDLL, &dpCurSettings); |
Where hInstDLLis the instance value that was passed to DllMain.
Calling this function assumes that a global variable dpCurSettingshas already been defined, where dpCurSettingsmust be a DBGPARAMstructure.
RegisterDbgZonesregisters debug zones for your process or module for all build configurations. To register only debug zones on Debug builds, use the DEBUGREGISTERmacro. To register debug zones on Debug and Retail builds, use the RETAILREGISTERZONESmacro.
Any module (a DLL or process) can register an associated debug zone mask with the kernel debug subsystem using this function. 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.
Requirements
Header | dbgapi.h |
Library | None |
Windows Embedded CE | Windows CE 2.10 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |