LoadLibrary() hangs under vista

kk8
kk8 used Ask the Experts™
on
LoadLIbrary("xxx.dll") works fine on XP but hangs on Vista. Any clues?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Author of the Year 2009
Commented:

Could you try loading the module with
   LoadLibraryEx()
  http://msdn.microsoft.com/en-us/library/ms684179.aspx
and see if the same error occurs?
kk8

Author

Commented:
Hi Dan,

Thanks for helping me out here. I did try that before I posted, the function has a 3rd argument with the choices of

0. NULL
1. LOAD_IGNORE_CODE_AUTHZ_LEVEL
2. LOAD_WITH_ALTERED_SEARCH_PATH

3. DONT_RESOLVE_DLL_REFERENCES
4. LOAD_LIBRARY_AS_DATAFILE
5. LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE
6. LOAD_LIBRARY_AS_IMAGE_RESOURCE


with 0-2, the behavior is same as LoadLibrary, for others it does not hang but does not get the job right. GetProcAddress fails to extract the correct loc.

Any clues? Thanks
Commented:
Looks like I finally figured out, apparently its the project settings thats dragging the func into such behavior. A clean project just with loadlibrary works fine...
Thank you anyways

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial