Answer the question
In order to leave comments, you need to log in
Problem with function call from DLL. Can you help?
Hello.
I'm trying to call an exported function from a dll, but the program fails. By offsets, I came to the line mov eax,[libssp-0.dll!__stack_chk_guard], where the program ends its work.
Can anyone tell me what is the problem here and how to get rid of it?
Answer the question
In order to leave comments, you need to log in
Broke the stack. Most likely the function was stdcall, and you called it as cdecl. Or vice versa. The crystal ball refuses to show in more detail.
I export the function as: int __declspec(dllexport) main(int argc, char *argv[]).
I call:
int (*DllFunc)();
h = LoadLibraryA((LPCSTR)"D:\\programms\\MinGW\\msys\\1.0\\tor\\tor-dll\\tor-0.2.4.24\\src\\or\\tor.dll") ;
DllFunc =(int(*) (void)) GetProcAddress(h, (LPCSTR)"main");
Dll Func();
If it helps no more wang :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question