PURPOSE
Sends debug messages to the debug log. Used by the driver code.
PROTOTYPE
DWORD WD_DebugAdd(
HANDLE hWD,
WD_DEBUG_ADD *pData);
PARAMETERS
| Name | Type | Input/Output |
|---|---|---|
| HANDLE | Input | |
| WD_DEBUG_ADD* | ||
| DWORD | Input | |
| DWORD | Input | |
| CHAR [256] | Input |
DESCRIPTION
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2] |
| pData | Pointer to an additional debug information structure: |
| 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. |
|
| 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. |
|
| The string to copy into the message log. |
RETURN VALUE
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].
EXAMPLE
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);