Sends debug messages to the debug log. Used by the driver code.
DWORD WD_DebugAdd(
HANDLE hWD,
WD_DEBUG_ADD *pData);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pData | WD_DEBUG_ADD* | |
| • dwLevel | DWORD | Input |
| • dwSection | DWORD | Input |
| • pcBuffer | CHAR[256] | Input |
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as
received from WD_Open() |
| pData | Pointer to an additional debug information structure: |
| • dwLevel |
Assigns the level in the Debug Monitor, in which the data will be
declared. If dwLevel is zero, D_ERROR will be declared.
For more details please refer to DEBUG_LEVEL in
windrvr.h.
|
| • dwSection |
Assigns the section in the Debug Monitor, in which the data will be
declared. If dwSection is zero, S_MISC section will be
declared. For more details please refer to DEBUG_SECTION in
windrvr.h.
|
| • pcBuffer | The string to copy into the message log. |
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise
WD_DEBUG_ADD add;
BZERO(add);
add.dwLevel = D_WARN;
add.dwSection = S_MISC;
sprintf(add.pcBuffer, "This message will be displayed in "
"the Debug Monitor\n");
WD_DebugAdd(hWD, &add);