Sets debugging level for collecting debug messages.
DWORD WD_Debug(
HANDLE hWD,
WD_DEBUG *pDebug);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pDebug | WD_DEBUG* | Input |
| • dwCmd | DWORD | Input |
| • dwLevel | DWORD | Input |
| • dwSection | DWORD | Input |
| • dwLevelMessageBox | DWORD | Input |
| • dwBufferSize | DWORD | Input |
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as
received from WD_Open() |
| pDebug | Pointer to a debug information structure: |
| • dwCmd |
Debug command: Set filter, Clear buffer, etc. For more details please refer to DEBUG_COMMAND in
windrvr.h.
|
| • dwLevel |
Used for dwCmd=DEBUG_SET_FILTER. Sets the debugging level to
collect: Error, Warning, Info, Trace.For more details please refer to DEBUG_LEVEL in
windrvr.h.
|
| • dwSection |
Used for dwCmd=DEBUG_SET_FILTER. Sets the sections to
collect: I/O, Memory, Interrupt, etc. Use S_ALL for all.
For more details please refer to DEBUG_SECTION in
windrvr.h.
|
| • dwLevelMessageBox |
Used for dwCmd=DEBUG_SET_FILTER. Sets the debugging level to
print in a message box. For more details please refer to DEBUG_LEVEL in
windrvr.h.
|
| • dwBufferSize |
Used for dwCmd=DEBUG_SET_BUFFER. The size of buffer in the
kernel.
|
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise
WD_DEBUG dbg; BZERO(dbg); dbg.dwCmd = DEBUG_SET_FILTER; dbg.dwLevel = D_ERROR; dbg.dwSection = S_ALL; dbg.dwLevelMessageBox = D_ERROR; WD_Debug(hWD, &dbg);