Posted By: Dartacan
Lite-C and SDK plug-in problem - 02/17/10 16:46
Hi guys.
I compile the “GStudio7\sdk_pugin\sampledll” and copy the sampledll.dll in the “acknex_plugins” folder. I build a application (test.exe) to communicate between Game Studio project (shooter_Demo) and test.exe. I don’t have any problem if I try to call some DLL function inside game studio, but I have problem when I try to call this function inside the test.exe. To probed this DLL I create other simple function inside this sampledll.dll, the function is “int Sum(long a, long b);” when I call this function in the test.exe it function work perfect.
I try to change the mouse coordinate in the game studio project and I want to use other external .exe software to do that, but I always have “Access Violation”.
Look this sample:
****** sampledll.dll ****
….
DLLFUNC void ZoomIn(var value)
{
// decrease the camera FOV by the value
v(camera).arc -= value;
}
DLLFUNC int Sum(long a, long b)
{
// I create this simple function
Return a+b;
}
******* test.exe ********
…
extern "C" _declspec(dllimport)void ZoomIn(long value);
extern "C" _declspec(dllimport)int Sum(long a, long b);
…
Void TForm1::ButtonClick(TObject *Sender)
{
Int aux=Sum(2,3);// It work PERFECT
ZoomIn(30);// It have a access violation message. Yes, the gstudio A7 project (shooter_demo) is working.
}
Anybody knows what happening here?
I compile the “GStudio7\sdk_pugin\sampledll” and copy the sampledll.dll in the “acknex_plugins” folder. I build a application (test.exe) to communicate between Game Studio project (shooter_Demo) and test.exe. I don’t have any problem if I try to call some DLL function inside game studio, but I have problem when I try to call this function inside the test.exe. To probed this DLL I create other simple function inside this sampledll.dll, the function is “int Sum(long a, long b);” when I call this function in the test.exe it function work perfect.
I try to change the mouse coordinate in the game studio project and I want to use other external .exe software to do that, but I always have “Access Violation”.
Look this sample:
****** sampledll.dll ****
….
DLLFUNC void ZoomIn(var value)
{
// decrease the camera FOV by the value
v(camera).arc -= value;
}
DLLFUNC int Sum(long a, long b)
{
// I create this simple function
Return a+b;
}
******* test.exe ********
…
extern "C" _declspec(dllimport)void ZoomIn(long value);
extern "C" _declspec(dllimport)int Sum(long a, long b);
…
Void TForm1::ButtonClick(TObject *Sender)
{
Int aux=Sum(2,3);// It work PERFECT
ZoomIn(30);// It have a access violation message. Yes, the gstudio A7 project (shooter_demo) is working.
}
Anybody knows what happening here?
