The information in this article applies to:
SUMMARYPROBLEM ID: PRLAN9210002 SYMPTOMSWhen writing a Visual Basic application using the LAN Manager for Visual Basic Toolkit, you may get the error "Bad DLL Calling Convention" if you try to call any of the following LAN Manager APIs: DosPrintDestControlThis is not a problem with your application. There is a known problem in the INCLUDE file, PMDEST.TXT, for the Print Destination APIs. CAUSE
Each of the APIs listed above return an unsigned short that
contains an error code or zero on success. Because Basic does not
understand the concept of data types like "unsigned short," the LAN
Manager Toolkit for Visual Basic processes these return codes as
integers.
RESOLUTIONYou can work around this problem by modifying the function declarations in PMDEST.TXT, and reimporting this INCLUDE file into your application. In the Function Prototypes section, the following lines read:
These lines should be changed to:
Note the percent sign (%) that now ends each API name. This defines
the functions as returning integers, and therefore will avoid the
"Bad DLL Calling Convention" error.
STATUSMicrosoft has confirmed this to be a problem in LAN Manager versions 2.0 and 2.1. We are researching this problem and will post new information here as it becomes available. Additional query words: PMSPL.DLL windows 2.0 2.00 2.1 2.10
Keywords : |
Last Reviewed: November 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |