

The DLL that I'm loading cannot be in the app's local directory so I've tried the following:ġ) LoadLibrary with a full path specified.

Make the LoadLibrary either work or fail. In fact, simply minimizing or maximizing an unrelated app can Then stop the other program and run mine again. While that program is running, I launch my Pick another program at random (Notepad, wordpad, FreeCell, or anything) and run it. Try running it 20 times and it still fails. Loads the dll and the LoadLibrary will fail with the "%1 is not a valid." error. For example, If there is nothing running on my machine (no desktop apps), I can launch my program that I believe that it might have something to do LoadLibrary call will sometimes succeed and sometimes it won't. Neither the program nor the dll's location have any blanks in the name. I have a program that dynamically loads a dll. For what it's worth, I'm getting thiĮrror and have nothing to do with IIS or services or games or file names and paths with blanks in them. I've seen lots of posts about this error but the stories vary. I've read as much as I could find on this but nothing exactly applies to my situation. I've been getting this error (%1 is not a valid win32 application) for days now and truly believe that it must be a bug. How do I give you my emailĪddress (other than here) in case somebody wants more info? Here's what I tried to send. Perhaps you can pass it on to the right folks. I kept making it shorter until there was not much point in sending it. I tried to send using that link but it kept saying that my 'answer' was too long. While that program is running, I launch my program and voila. For example, If there is nothing running on my machine, I can launch my program that loads the dll and the LoadLibrary will fail with the "%1 is not a valid." error. Quite simply the LoadLibrary call will sometimes succeed and sometimes it won't. I'm getting this error and have nothing to do with IIS or services or games or file names and paths with blanks in them. I see lots of posts about this error but none of them really apply to me.
