memory access violaton when call dll

Blitz3D Forums/Blitz3D Beginners Area/memory access violaton when call dll

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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?