PRB: NdisMWriteLogData Returns Incorrect Status Value

ID: Q194638


The information in this article applies to:


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 kbNTOS400 
Version           : 
Platform          : 
Issue type        : kbprb 

Last Reviewed: March 6, 1999