PRB: NdisMWriteLogData Returns Incorrect Status Value (194638)
The information in this article applies to:
- Microsoft Win32 Device Driver Kit (DDK) for Windows NT 4.0
This article was previously published under Q194638 SYMPTOMS
NdisMWriteLogData returns an uninitialized NDIS_STATUS for a successful
write condition. As a result, you get a garbage value off of the stack.
CAUSE
NDIS does not properly set the return status to NDIS_STATUS_SUCCESS for a
successful write condition.
RESOLUTION
This is fixed in Win2k and beyond. To work around this in versions of Windows predating Win2k, have your code check for following:
status = NdisMWriteLogData( LogHandle, LogBuffer, LogBufferSize);
if ( NDIS_STATUS_BUFFER_OVERFLOW == status) {
//
// You have an error condition.
//
} else {
//
// Continue...
//
}
NOTE: The status code is compared to NDIS_STATUS_BUFFER_OVERFLOW, which is
also incorrectly documented in the Windows NT DDK and addressed in the
following article in the Microsoft Knowledge Base:
194637
DOC: Error Incorrect NdisMWriteLogData Return Value
Modification Type: | Minor | Last Reviewed: | 7/21/2004 |
---|
Keywords: | kbNDIS kbprb KB194638 |
---|
|