BUG: NetBios NCBCANCEL over TCP/IP Does Not Block Under Win95 (195195)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
    • the operating system: Microsoft Windows 95

This article was previously published under Q195195

SYMPTOMS

When you use blocking Netbios calls over TCP/IP, it is possible that calling NCBCANCEL on a blocked Netbios call (such as NCBSEND or NCBRECV) will not block on Windows 95 Gold and Service Pack 1. The call to Netbios() returns immediately with a success. However, this does not guarantee that the request command has been cleanly cancelled.

This is especially important if the application is in the process of cleaning up before exiting. If the NCBCANCEL command is issued and the Netbios name table is immediately cleared either through NCBDELNAME or NCBRESET commands, the results are unpredictable and could crash the application.

RESOLUTION

To prevent any instability, ensure that the command to be cancelled returns from its Netbios() call with the error NRC_CMDCAN before manipulating the Netbios name table.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Set TCP/IP as the default protocol.
  2. Issue a synchronous Netbios() NCBRECV command in a child thread.
  3. Issue a Netbios NCBCANCEL command in the main thread to cancel this NCBRECV.
  4. The NCBCANCEL command returns immediately with success. This would imply that the NCBRECV was cancelled. However, the NCBRECV is still active and takes some time before it terminates.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbAPI kbbug kbNetBIOS kbnetwork kbpending KB195195