The information in this article applies to:
SYMPTOMSIf you declare a mixed language SUB procedure or FUNCTION that uses the CDECL keyword, the CDECL keyword is ignored if the DECLARE statement appears in the module level of a form. This problem only occurs in a compiled program and causes the LINK.EXE error L2029 "unresolved external" to occur when LINKing the program together. WORKAROUND
Listed below are some suggested ways to work around this problem.
STATUSMicrosoft has confirmed this to be a bug in the Standard and Professional Editions of Microsoft Visual Basic for MS-DOS, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
When creating a program that uses procedures compiled in another language,
it may be desirable to use the CDECL keyword when declaring those
procedures in Basic. Usually, when you compile a program using the CDECL
keyword, the DECLARE statement is converted to a reference to the
equivalent function in the other language and written to the object (.OBJ)
file. One other feature of the CDECL keyword is that it appends an
underscore to the beginning of that procedure name and converts all the
letters to lowercase before writing it to the object (.OBJ) file. For
example, by default, when compiling a routine in C, the routine name is
also preceded by an underscore. In Visual Basic for MS-DOS, if you declare
a procedure using the CDECL keyword in a form, the procedure name written
to the object (.OBJ) file is just the name of the procedure in capital
letters with no additional underscore. This is the way it would work if you
did not specify the CDECL keyword.
Additional query words: VBmsdos BUGLIST1.00 1.00
Keywords : |
Last Reviewed: December 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |