2
votes

I am porting a C++ project from an old Borland compiler to VisualStudio 2008. This project uses a third party DLL that I don't have the source code for, so I am unable to recompile or modify it. The header file for the DLL defines functions along the lines of:

extern "C" {
void __stdcall Init(int a, int b);
}

However when I try to link to this DLL, VisualStudio says that it cannot find the function _Init@8. When I look at the DLL I find that the function name is _Init, and not _Init@8 (it seems that the DLL to predates Microsoft adding @8 to stdcall name mangling).

My question is: How can I call funcions in this DLL? Does VisualStudio simply not support these old DLLs, or is there a flag/setting that I'm missing. (I am aware that I could use the LoadLibrary/GetProcAddress functions to dynamically call the functions at run-time, but would prefer to not to.)

1

1 Answers

0
votes

I didn't notice anything that would tell me whether you are doing 32 or 64 bit coding. MSDN has some information on how to create an import library based on a dll that you have no source for. This article is for making a 32 bit import library. CHEERS!