PRB: VB Error Using Shell: Cannot Find DLL, Insert in Drive A (80404)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q80404 SYMPTOMS
When a Visual Basic application shells to a Microsoft Windows-based
application that expects to find a dynamic link library (DLL) in its own
directory, Visual Basic may generate the following error message and fail
to start the application:
Cannot Find <DLL NAME>, Please Insert in Drive A
CAUSE
This error occurs because the application being shelled to expects to find
the DLL in the current directory, the MS-DOS path, or the Windows
directory. Shelling to an application in code does not change the current
directory, even if you specify the path to the application in the Shell
statement.
RESOLUTION
One solution is to use Visual Basic for Windows' ChDir statement to change
the current directory to the directory containing the DLL before attempting
to shell to the application. An alternative solution is to copy the DLL to
the Windows directory, or include the path where the DLL is located in the
MS-DOS path.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbprb KB80404 |
---|
|