I wrote a simple program to test the dll function, but each time got a memory violation warning.
The code in blitz3D:
bankin=CreateBank(6000)
bankout=CreateBank(6000)
CallDLL("TestDll","Test",bankin,bankout)
The code in VC for the DLL:
_declspec(dllexport) int _cdecl TestDll(const void *pIn,void *pOut)
{
*pOut=1;
return 1;
}
It seems the line "*pOut=1" caused the violation. Why?
The code in blitz3D:
bankin=CreateBank(6000)
bankout=CreateBank(6000)
CallDLL("TestDll","Test",bankin,bankout)
The code in VC for the DLL:
_declspec(dllexport) int _cdecl TestDll(const void *pIn,void *pOut)
{
*pOut=1;
return 1;
}
It seems the line "*pOut=1" caused the violation. Why?