Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiled EXE differs from Running Code 1

Status
Not open for further replies.

SmokingCrater

Programmer
Jun 29, 2001
47
US
Forum members,

I have an interesting dilemma. I am attempting to create an ActiveX .EXE which will monitor some stuff. During development, the project was run to simulate the .EXE being available. This worked fine. The code synched up properly and everything worked like it was supposed to. Now, I am getting to the deployment stage where I need to build an .EXE out of the code. The problem I am having is that the .EXE has different behavior than the code did!! I am getting errors with the .EXE that don't occur when I run the code! Does anyone know why a compiled ActiveX .EXE would act differently than running the code from within VB6? Any ideas would be great. Thanks.

(as a side note, yes I am pointing in the correct location. I have changed calling application pointers to point at the compiled .exe instead of the project. And yes, I have cleaned the registry so as to eliminate any old versions that may be hanging around)

Thanks again,

-crater
 
*UPDATE*

Since this posting, I have found that the problem was that the ActiveX component was getting destroyed an re-created. When running against the project code in development mode, the instance of the ActiveX component never disappears. When the code was compiled, whenever a call to the component was made, a process was started, the code needed executed, and then the process was closed/killed. This causes any instance variables of the component to be cleared and reset. Our problem was occuring because we were setting some of those instance variables and the settings were not being kept.

Remedy to the problem, in the calling code, create a reference to the component and keep the reference until you are done with it. Then erase the reference to the component and it goes away.

-crater
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top