Share via


RegisterDbgZones

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function is called by the DEBUGREGISTER and RETAILREGISTERZONES macros 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 DllMain entry point of your DLL. For example, from the main function of a process, call:

 RegisterDbgZones(NULL, &dpCurSettings);

From the entry point of a DLL, call:

 RegisterDbgZones(hInstDLL, &dpCurSettings);

Where hInstDLL is the instance value that was passed to DllMain.

Calling this function assumes that a global variable dpCurSettings has already been defined, where dpCurSettings must be a DBGPARAMstructure.

RegisterDbgZones registers debug zones for your process or module for all build configurations. To register only debug zones on Debug builds, use the DEBUGREGISTER macro. To register debug zones on Debug and Retail builds, use the RETAILREGISTERZONES macro.

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 Control window. 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

See Also

Reference

DEBUGREGISTER, RETAILREGISTERZONES