boberman
2008-09-30 18:46:35
Ok, I have ran into a snag with Scar++, I want to put a alright plugin loader into it, but the problem is that data types in delphi plugins don't always convert straight over.
So here is where I am at, if you can figure out how to do this I would be much appreciative.
What you need is Wizzup's Plugin from the SRL SVN. Put it in the same folder. Here is the program I have so far.
Well, thats what I have so far. If you know how to get further I would be very grateful.
So here is where I am at, if you can figure out how to do this I would be much appreciative.
What you need is Wizzup's Plugin from the SRL SVN. Put it in the same folder. Here is the program I have so far.
#include <iostream>
#include <windows.h>
using namespace std;
typedef long (*fcount)() __attribute((stdcall));
typedef long (*finfo)(int, void**, char**) __attribute((stdcall));
typedef POINT*& (*tpa)(HDC) __attribute((stdcall));
fcount GetFunctionCount;
finfo GetFunctionInfo;
int main()
{
long count;
HINSTANCE inst = LoadLibrary("WizzyPlugin.dll");
GetFunctionCount = (fcount)GetProcAddress(inst,"GetFunctionCount");
GetFunctionInfo = (finfo)GetProcAddress(inst,"GetFunctionInfo");
tpa CreateTPAFromBMP;
void* funcAddr;
char* junk = new char[512];
POINT* points;
GetFunctionInfo(33, &funcAddr, &junk);
CreateTPAFromBMP = (tpa)funcAddr;
cerr << "Failed after here!\n";
cerr << notJunk << endl;
HDC dc = GetDC(GetDesktopWindow());
cerr << "got the correct dc\n";
points = CreateTPAFromBMP(dc);
return 0;
}Well, thats what I have so far. If you know how to get further I would be very grateful.