September 28th, 2013, 06:34 AM
[RESOLVED] VB6 IDE vs EXE errors
I have a legacy VB6 program that I am updating to Win7. This is a machine vision app, with a new DLL from a camera vendor.
I have a very simple VB6 test program that works great with the new DLL - both in the IDE, and as a compiled EXE.
When I add the updated code to my main project, the program works flawlessly when run from the IDE, but fails simple calls when compiled as an EXE.
i.e. - there is a simple function call to identify any camera devices connected to the computer. If I add a call to this function as the first line of code in the opening form, it works through the IDE, but returns an empty string when run as an EXE. Again, this works fine, with a much simpler project.
Somehow, adding additional forms, modules, and/or project components or references, breaks the EXE.
I have tried Win7 options of 'XP compatibility mode' and 'run as admin' - but nothing seems to help.
What's different between the IDE and the compiled EXE environments?
Additional possible clue: 'sometimes' when run from the IDE, I get the following error message:
"Can't create window of class wxWindowClassNR (error 0: the operation completed successfully.)"
This in itself boggles my mind: an error message, followed by a statement that the err number is 0, and no error????
Any clues to any of the above would be appreciated...
September 29th, 2013, 05:00 PM
Re: [RESOLVED] VB6 IDE vs EXE errors
Problems solved! There was basically nothing wrong with my code. The main project contains 51 files (forms and modules). For historical (and hysterical?) purposes, I 'conveniently' archived all dependent DLL's in this same project folder during development days in Windows XP - and then forgot about them.
When the updated project was executed from the IDE, the correct Windows7 DLL files were used. When the EXE file was run from folder, the old WinXP DLL's in the same folder were used!
Doh!!! What a way to waste an entire weekend!
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!