次の方法で共有


Setting Debug Zone Parameters (Compact 2013)

3/28/2014

The DBGPARAM structure holds debug output information according to the parameters set in the global variable dpCurSettings.

The following fields are defined by dpCurSettings.

Field

Description

Module name

Used to look for debug zone initialization information in the registry of the development computer and the registry of the target device.

This name should match the DLL or EXE name as closely as possible, because this is the name that the debug shell uses to identify it.

Debug zone name

Shows the names of the debug zones that are displayed by a control application, such as Target Control, that allows the user to set zones.

The control application turns the debug zones on or off.

Initial debug zone mask

Defines which zones are enabled by default, and turns on specific debug zones during startup.

Restrict this setting to messages that are important. Otherwise, a large amount of debug output is generated during boot.

The following code example shows a DBGPARAM structure in the application's source code for the previously defined debug zones and debug zone masks.

DBGPARAM dpCurSettings = {
    //Process or module name, DbgSamp1
    TEXT("DbgSamp1"), 
      
     { // Descriptive names for 16 zones
       TEXT("Init"),TEXT("Seconds"),TEXT("Except"),TEXT(""),
       TEXT(""),TEXT(""),TEXT(""),TEXT(""),
       TEXT(""),TEXT(""),TEXT(""),TEXT(""),
       TEXT(""),TEXT(""),TEXT("Warnings"), TEXT("Errors")
     },
    // Zones enabled by default
    ZONEMASK_ERROR|ZONEMASK_INIT
}; 

In this example, DbgSamp1 is either a process or module name. This name is followed by descriptive names for the 16 debug zones that are defined in the application's header file.

The descriptive names are listed in order of their bit position. The debug zone corresponding to 0x01 is listed first and the debug zone corresponding to 0x8000 is listed last.

ZONEMASK_ERROR and ZONEMASK_INIT, are two of the 16 debug zones. These two zones are turned on when the application starts. The names Init and Errors will appear in output, and correspond to the debug zones ZONEMASK_INIT and ZONEMASK_ERROR.

Remarks

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.

See Also

Reference

Debugging Reference