Using VC6 DLL exported classes with BCB
Hi,
Big daddy Bill is making this one easy again. Seems changes in _cdecl caused
problems and documented on borland site but the explanation seems out of
date.
I have classes in a VC 6 servicepack 3 DLL of which one is exported using :
class __declspec(dllexport) CLCCOMProtocol: public CProtocol
I tried using the .lib generated by VC but it's not compatible. invalid OMF
format
The one generated by BCPP implib does not work either
[Linker Error] Unresolved external 'CLCCOMProtocol::~CLCCOMProtocol()'
referenced from D:\CONSOLEMONITEQ\MAINFORM.OBJ.
[Linker Error] Unresolved external 'CLCCOMProtocol::CLCCOMProtocol()'
referenced from D:\CONSOLEMONITEQ\MAINFORM.OBJ.
The FAQ1574C and TI2387C at borland describe process on output i'm not
getting from either
utilities or compilers
Has anyone sucessfully linked a VC dll with BC4. By the way I need to be
able to use this DLL with both BC4 and VC6 as two projects will depend on
that DLL.
The def exported by impdef looks like this
LIBRARY MONICOMM.DLL
EXPORTS
??0CLCCOMProtocol@@QAE@ABV0@@Z @1
??0CLCCOMProtocol@@QAE@XZ @2
??1CLCCOMProtocol@@QAE@XZ @3
??4CLCCOMProtocol@@QAEAAV0@ABV0@@Z @4
??_7CLCCOMProtocol@@6B@ @5
?Close@CLCCOMProtocol@@UAEKXZ @6
?GetConfigByString@CLCCOMProtocol@@UAEKPAD@Z @7
?GetDataObj@CLCCOMProtocol@@UAEKAAUAuDataObj@@@Z @8
?GetDataObjList@CLCCOMProtocol@@UAEKAAHQAUAuDataObjDef@@@Z @9
?GetMultDataObj@CLCCOMProtocol@@UAEKHQAUAuDataObj@@@Z @10
?HexStrToLong@CLCCOMProtocol@@AAEXPADAAK@Z @11
?HexStrToWord@CLCCOMProtocol@@AAEXPADAAG@Z @12
?Open@CLCCOMProtocol@@UAEPAXUCommConfiguration@@@Z @13
?Open@CLCCOMProtocol@@UAEPAXXZ @14
?PGetLastError@CLCCOMProtocol@@UAEKXZ @15
?Reset@CLCCOMProtocol@@UAEKXZ @16
?SendCommand@CLCCOMProtocol@@UAEKPBDHPAXAAH1@Z @17
?SetConfigByString@CLCCOMProtocol@@UAEKPAD@Z @18
?SetConnectionType@CLCCOMProtocol@@UAEKW4ENUM_CONNECTION@@@Z @19
?SetDataObj@CLCCOMProtocol@@UAEKABUAuDataObj@@@Z @20
?SetMultDataObj@CLCCOMProtocol@@UAEKAAHQBUAuDataObj@@@Z @21
?Transaction@CLCCOMProtocol@@UAEKPAE0K@Z @22
Thanks for any inputs
Marc Leclerc
lecle...@snemo.com