problem with getprocaddress in service - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

problem with getprocaddress in service

Hello!
For example, i have a little function in dll:
void dll_func(){
char buf[32];
char* p = "qwerty";
strcpy(buf,p);
// or
GetLastError();
}

I call GetProcAddress("dll_func") and call got function.
If it happened in nonservice application, then dll_func works OK.
But if service calls dll_func, then it get access violation in strcpy.
In service debug window I see that [p = "qwerty";] - is unreadable pointer.
The same if dll_func contains only GetLastError() call - it get access violation.
I suspect that dll data segment was loaded incorrectly or did not loaded at all when dll was loaded fom service.
Anybody, could you help me!

Sign In or Register to comment.