Hi
Thanks for the help. I have taken some time to get back to it.
When I try to build the DLL with the following code mentioned above:
#include "stdafx.h"
#define DLL_USE
#include "adll.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
engine_bind();
return TRUE;
}
DLLFUNC var KillFile(long file) {
STRING *my_file = (STRING *)file;
if(remove(my_file->chars)) {
return _VAR(1);
} else {
return _VAR(-1);
}
//fixed *temp = (fixed *)adll_getwdlobj("temp");
// temp is a pointer to VECTOR structure with newer SDK?
VECTOR* vTemp = (VECTOR*) engine_getobj("temp");
if (vTemp == NULL) { return _VAR(0); }
vTemp->x = _VAR(3.14f);
}
I get the following three errors.
c:\Projects\Last\Last.cpp(17): warning C4312: 'type cast' : conversion from 'long' to 'STRING *' of greater size
c:\Projects\Last\Last.cpp(18): error C3861: 'remove': identifier not found, even with argument-dependent lookup
c:\Projects\Last\Last.cpp(25): warning C4312: 'type cast' : conversion from 'long' to 'VECTOR *' of greater size
Would you have any advice on how to correct these? I found a good tutorial on the GameStudio site about creating a DLL in .Net which seems to have helped me as well.