NetBiosSubmit() Returns Invalid Error Codes (70883)



The information in this article applies to:

  • Microsoft LAN Manager 2.0b, when used with:
    • the operating system: MS-DOS

This article was previously published under Q70883

SYMPTOMS

PROBLEM ID: 1085

NetBiosSubmit() returns the invalid NetBIOS errors 261, 277, and 281.

CAUSE

Microsoft has confirmed this to be a problem in DOS LAN Manager version 2.0b.

RESOLUTION

After checking for NERR_* return codes, mask the return codes with 0x00FF. For example, the following sample code demonstrates how to work around this problem:
         err = NetBiosSubmit(handle, opt, ncbptr);

         if ( err == NERR_Success )
         {
             "no error"
         }
         else if ( err > NERR_BASE && err <= NERR_MAX )
         {
             "lanman error"
         }
         else if ( (err & 0x00FF) == ncbptr->ncb_retcode )
         {
             "ASSUME NetBios error"
         }
         else
         {
             "sys error or bogus return"

              switch (err)
              {
                 case    "documented OS2 errors"
                         ...

                 default "assume bogus or undocumented ret codes"
              }
         }
				

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:KB70883