|
Has anyone gotten this stuff to work yet? I keep getting ESP (the register, not the psychic ability) errors. Here's what I have:
typedef bool (*VerifyProc) (TModuleRec *);
struct TModuleRec {...all kinds of stuff...};
then in main I have:
VerifyProc TestRecAlignment;
HINSTANCE ret;
TModuleRec tModRec;
ret=LoadLibrary("tokenizer.dll");
TestRecAlignment=(VerifyProc)GetProcAddress(ret, "TestRecAlignment");
(TestRecAlignment) (&tModRec);
This last call always generates an esp verify error and tells me it is probably because my function pointer uses a different calling convention than the original function. However, I believe I am doing it correctly, but it is hard to verify as the people at Parallax hid the EXPORTs from QuickView.
[EDIT]
Nevermind... I just figured it out. Instead of using the normal __cdecl calling convention, it uses __stdcall. Thus, if you're trying to do something with these libraries, make sure you define your pointers as __stdcall:
typedef bool (__stdcall *TestRecAlignmentProc) (TModuleRec *);
[/EDIT]
Last edited by rbayer : 25-09-2002 at 22:45.
|