次の方法で共有


RegisterDbgZones (Compact 2013)

3/28/2014

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 DBGPARAM structure.

NOTE: In a retail build, when the environment variable "WINCESHIP=1" is set, dpCurSettings will NOT be included in the library. To use dpCurSettings for a retail build, rebuild the library with "WINCESHIP=" or use the debug build to build the individual DLL.

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

See Also

Reference

Debugging Functions
DEBUGREGISTER, RETAILREGISTERZONES