delorie.com/archives/browse.cgi | search |
On Thu, Mar 02, 2000 at 05:45:49PM -0000, Fifer, Eric wrote: > libref = LoadLibraryExA("lib.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH); > symref = GetProcAddress(libref, "func1"); > func = (void *) symref; > func(); > > exit(0); > } > >Any thoughts on what is happening here? > >I'm using the Feb-28 snapshot. Since fork/exec are not aware of LoadLibrary calls, I am surprised that you would see any success anywhere. dlopen() may work better. What is happening is that you're doing a fork and the fork code is duplicating everything it knows about in the paren't address space. It doesn't know about your use of LoadLibrary so it doesn't duplicate it. Then, the code tries to jump into func() which doesn't exist. cgf
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |