Skip to content

Commit 73833b3

Browse files
committed
"LoadLibrary" returns NULL instead of INVALID_HANDLE_VALUE on errors (Issue #2)
1 parent 7feb92c commit 73833b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MemoryModule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ BuildImportTable(PMEMORYMODULE module)
247247
POINTER_TYPE *thunkRef;
248248
FARPROC *funcRef;
249249
HMODULE handle = LoadLibrary((LPCSTR) (codeBase + importDesc->Name));
250-
if (handle == INVALID_HANDLE_VALUE) {
250+
if (handle == NULL) {
251251
#if DEBUG_OUTPUT
252252
OutputLastError("Can't load library");
253253
#endif

0 commit comments

Comments
 (0)