The information in this article applies to:
SYMPTOMS
If you create a compiled executable program that has the same base name as
a dynamic link library (DLL) that is called from the program, an "Error
Loading DLL" message will be displayed when the compiled program attempts
to call the DLL. If the DLL is loaded before the .EXE program is run (for
example, if the DLL is in use from another application), the executable
program will not run at all.
CAUSE
This behavior occurs because Windows checks, by module name, to see if a
program is already loaded before it tries to execute that program. If the
requested module is already loaded, Windows creates another instance of
that module. Thus, attempting to load a DLL with the same module name as an
already executing program will fail (usually with the error "Error Loading
DLL"), and attempting to start an executable program with the same module
name as an already loaded DLL will not execute the program.
RESOLUTIONTo avoid this problem, either recompile the Visual Basic program and change the .EXE filename, or re-create the DLL, and change the LIBRARY entry in the module definition file. STATUSThis behavior is by design. It can occur with any Windows-based application, and may occur between any two Windows-based modules (either from executable programs or DLLs). Additional query words: 2.00 3.00
Keywords : |
Last Reviewed: June 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |