VB3 PRB: Making .EXE Error: Wrong Version of Runtime DLL

Last reviewed: January 9, 1997
Article ID: Q112770
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, version 3.0

SYMPTOMS

If a copy of an executable is running on your computer, and you try to create a new executable with the same name, you'll receive this error:

   Wrong version of runtime DLL.

followed by another error:

   Unexpected error quitting.

CAUSE

This error is caused by the fact that Windows doesn't load a new copy of a module if it thinks the module is already in memory. Because one instance of your .EXE file is running already, attempting to run the re-compiled version really just increments the usage count of the .EXE that is already running.

The Visual Basic error occurs because VBRUN300.DLL tries to open the .EXE file and read resources out of it. But the .EXE file you're reading from is different from the .EXE file that is actually running (because you did a

'Make EXE' over the old one), so VBRUN300 has problems. It signals with the
"Wrong version of run-time DLL" error. It reports this error because it is under the assumption that because it could not read the .EXE file, it doesn't have the correct version of VBRUN needed to execute that .EXE file.

RESOLUTION

To work around the problem, either rename the .EXE when you create a new executable, or exit from the executable that is currently running.


KBCategory: kbenv kbprg kbprb
KBSubcategory: EnvtRun
Additional reference words: 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.