My 32-bit DLL needs to call a 16-bit DLL ReadSize16.dll and
I get the linking error:
error LNK2001: unresolved external symbol "int __stdcall _ReadSize(unsigned char, unsigned char *, unsigned long)" (?ReadSize@@YGHEPAEK@Z)
fatal error LNK1120: 1 unresolved externals
What am I missing?
My 32-bit DLL code is below:
//--------------------------------------------------------------------
#include <windows.h>
// Prototype for function in 16-bit DLL
BOOL FAR PASCAL ReadSize(BYTE bDrive, LPBYTE lpBuffer, DWORD cbBuffSize);
__declspec(dllexport) BOOL WINAPI CallReadSize()
{
HMODULE hModule;
char lpBuff[512];
BOOL fResult;
if ((hModule=LoadLibrary("ReadSize16.dll")) == NULL)
return 5; // DLL load error
if (GetProcAddress(hModule, "ReadSize") == NULL)
return 6; // DLL function call error
if (fResult=ReadSize(0x80, (LPBYTE)lpBuff, 512)) {
.......
}
return fResult;
}
