Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Class Termination not being called
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Threshold
Squire

USA
44 Posts

Posted - Apr 19 2005 :  01:14:21 AM  Show Profile  Reply with Quote
I have an ActiveX Document DLL chalk full of classes. Many of my classes write to a common log file (which is controlled by a class). Everything works fine and dandy until I compile.

I can compile my ActiveX Document DLL just fine. When I reference it with another project and run it within the IDE, everything works just fine as well. However, when I compile the project and run it from the executable, the Class_Terminate event isn't called. The termination logs to my log file usually, but not after the project is compiled. To verify, I placed a simple Call MsgBox("Hello") in the Class_Terminate event and compiled the DLL. Running the project in the IDE effectively produced my intuitive output, but after compiling, my poor program was silent.

I have been able to FORCE the termination event to be called by adding a public method which called it and calling that from the executable project. But it is not called on its own.

Any ideas on what's going on?

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."

Eric Coleman
Gladiator

USA
811 Posts

Posted - Apr 19 2005 :  6:43:44 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
I'm not familiar with activex "documents". What exactly are you using this for? I thought that the "activex document" was for displaying dynamic content within IE and not much else.

Go to Top of Page

Threshold
Squire

USA
44 Posts

Posted - Apr 19 2005 :  8:18:53 PM  Show Profile  Reply with Quote
ActiveX Document DLL, ActiveX DLL--They're basically the same thing in VB. In the New Project dialog there are two similar entries: ActiveX DLL and ActiveX Document DLL. No matter which one you create, its project properties dialog (under the General tab) still says the project type is ActiveX DLL (one of four possibilities: Standard EXE, ActiveX EXE, ActiveX DLL, and ActiveX Control). ActiveX Document DLL is just a template ActiveX DLL and it wasn't till you mentioned it that I realized I'm not really using the Document part. Whatever it was in the template that made it an ActiveX Document, I probably changed. So sorry, I'm talking about an ActiveX DLL (just goes to show how familiar I am with the ActiveX DLL stuff).

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Apr 19 2005 :  9:30:02 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Actually, the difference isn't so simple. An activeX document is more like a usercontrol that's viewed as a "web page", and I use the term "web page" loosely.

As for your original problem, I have no idea why your Terminate event isn't called. I can't duplicate your problem. I can create an activeX DLL with a message box in the termiante event. I get the message box from creating the class in a project within the IDE and from a compiled program.

Is your problem related to this particular project or can you create a simple example where it doesn't work?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.