I got this C code
Code:
#include <string.h>
#define DllExport extern __declspec( dllexport ) __stdcall
static int __stdcall a() {
return 42;
}
DllExport int GetFuncCount(void) {
return 1;
}
DllExport int GetFuncInfo(int x, void **addr, char **def) {
switch (x) {
case 0:
*addr = (void *)&a;
strcpy(*def, "function a(): integer;");
break;
default:
x = -1;
}
return x;
}
DllExport int GetFunctionCallingConv(int x) {
return 1;
}
This is the def file generated by the linker
Code:
EXPORTS
GetFuncCount@0 @ 1
GetFuncInfo = GetFuncInfo@12 @ 2
GetFuncInfo@12 @ 3
GetFunctionCallingConv = GetFunctionCallingConv@4 @ 4
GetFunctionCallingConv@4 @ 5
GetFuncCount = GetFuncCount@0 @ 6
Simba code
Simba Code:
program New;
{$loadlib test.dll}
begin
writeln(inttostr(a()));
end.
This is my error
Your DLL test.dll has not been found
Your DLL test.dll has not been found
Exception in Script: Unknown compiler directives at 3:3