When I call InjectLibrary and pass in an invalid filename in the libFileName param, the function returns False and GetLastError reports ERROR_FILE_NOT_FOUND, as you would expect.
However if I pass in a blank value in libFileName, InjectLibrary returns True! In this case GetLastError reports ERROR_ACCESS_DENIED (which it also does after a successful injection).
The same thing happens with UninjectLibrary. It returns True with a blank value, though in this case GetLastError reports ERROR_INSUFFICIENT_BUFFER. This happens on Win98SE and on XP.
InjectLibrary with invalid filename
-
- Posts: 27
- Joined: Mon Jun 14, 2004 12:45 pm