Microsoft KB Archive/70883

= NetBiosSubmit Returns Invalid Error Codes =

Article ID: 70883

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft LAN Manager 2.0b, when used with:
 * Microsoft MS-DOS 6.22 Standard Edition

-



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 ) {            &quot;no error&quot; }        else if ( err > NERR_BASE && err <= NERR_MAX ) {            &quot;lanman error&quot; }        else if ( (err & 0x00FF) == ncbptr->ncb_retcode ) {            &quot;ASSUME NetBios error&quot; }        else {            &quot;sys error or bogus return&quot;

switch (err) {                case    &quot;documented OS2 errors&quot; ...

default &quot;assume bogus or undocumented ret codes&quot; }        }

Additional query words: 2.00b NetBiosSubmit

Keywords: KB70883

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.