Skip to content

Commit

Permalink
"LoadLibrary" returns NULL instead of INVALID_HANDLE_VALUE on errors …
Browse files Browse the repository at this point in the history
…(Issue fancycode#2)
  • Loading branch information
fancycode committed Apr 9, 2012
1 parent 7feb92c commit 73833b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ BuildImportTable(PMEMORYMODULE module)
POINTER_TYPE *thunkRef;
FARPROC *funcRef;
HMODULE handle = LoadLibrary((LPCSTR) (codeBase + importDesc->Name));
if (handle == INVALID_HANDLE_VALUE) {
if (handle == NULL) {
#if DEBUG_OUTPUT
OutputLastError("Can't load library");
#endif
Expand Down

0 comments on commit 73833b3

Please sign in to comment.