MSDN documentation contains
If the function succeeds, the return value is a handle to the module.
If the function does not work, the return value NULL. For extended error information, call GetLastError.
while Microsoft support contains a list of return values ββless than 32 that indicate an error
The API function LoadLibraryloads the DLL and returns either a handle or an error code. If the return value is less than 32, it indicates one of the errors listed below. A return value greater than or equal to 32 indicates success, and you must call the function FreeLibraryto unload the library.
The second article was last reviewed in 2003 and is explicitly applied to Visual Basic 4.0.
What is right? LoadLibraryreturns != 0or >= 32for success? Either both are correct, and I miss a hint of a version difference or a special Windows API shell other than the C style interface.
source
share