Microsoft KB Archive/194638

{|
 * width="100%"|

PRB: NdisMWriteLogData Returns Incorrect Status Value

 * }

Q194638

-

The information in this article applies to:


 * Microsoft Win32 Device Driver Kit (DDK) for Windows NT, version 4.0

-

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
To work around this, 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:

"Q194637 DOC: Error Incorrect NdisMWriteLogData Return Value" Additional query words: NdisMWriteLogData

Keywords : kbDDK kbNDIS kbOSWinNT400

Issue type : kbprb

Technology : kbAudDeveloper kbWinDDKSearch kbWin32sSearch kbWin32DDKSearch kbWin32DDKNT400 kbWin32DDKNTSearch