LoadLibrary returns NULL if loading failed

This commit is contained in:
Joachim Bauch
2013-03-09 00:03:04 +01:00
parent 6f4f2bdd5b
commit f7a34964ff
+1 -1
View File
@@ -14,7 +14,7 @@ void LoadFromFile(void)
{
addNumberProc addNumber;
HINSTANCE handle = LoadLibrary(DLL_FILE);
if (handle == INVALID_HANDLE_VALUE)
if (handle == NULL)
return;
addNumber = (addNumberProc)GetProcAddress(handle, "addNumbers");