mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[HH] Check LoadLibrary and GetProcAddress return value (#6082)
Handle failure cases.
This commit is contained in:
parent
d795021a75
commit
9ea2222967
1 changed files with 7 additions and 4 deletions
|
@ -15,11 +15,14 @@ WinMain(HINSTANCE hInst,
|
|||
int ret = -1;
|
||||
|
||||
hModule = LoadLibraryA("hhctrl.ocx");
|
||||
doWinMain = (DOWINMAIN*) GetProcAddress(hModule, "doWinMain");
|
||||
|
||||
if (hModule)
|
||||
{
|
||||
doWinMain = (DOWINMAIN*)GetProcAddress(hModule, "doWinMain");
|
||||
if (doWinMain)
|
||||
ret = doWinMain(hInst, cmdline);
|
||||
|
||||
FreeLibrary(hModule);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue