problem with getprocaddress in service

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

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.

Howdy, Stranger!

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