Suppressing "Cannot Find MYDLL.DLL" Error Box (111610)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.0
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q111610 SUMMARY
When explicitly loading a dynamic-link library (DLL) using LoadLibrary(),
Windows will display a "file error" message box with the error
Cannot find MYDLL.DLL
where MYDLL.DLL is the name of the DLL specified in LoadLibrary() before
returning from LoadLibrary() if the DLL does not exist in the Windows path.
For more information about the Windows path, see the Windows search order
described in the documentation for LoadLibrary().
It is possible to suppress this error message so that a custom error
message or other error handling may be implemented without this system
error box. To do so, call SetErrorMode() with SEM_NOOPENFILEERRORBOX before
the call to LoadLibrary(). LoadLibrary() will return error code 2 meaning
"File was not found."
Modification Type: | Major | Last Reviewed: | 10/29/2003 |
---|
Keywords: | kb16bitonly KB111610 |
---|
|