Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer does not work when compile Multithreaded
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00458173
Message ID:
00459776
Views:
24
>>Hi!
>>
>>COM objects are quite different than usual VFP objects. It is not recommended to use any other class than "custom" for COM objects.
>>
>>I don't know exactly if it will work, but try following:
>>- Make your COM object as custom object
>>- in the INIT event create timer object and assign it to the custom hidden property of main COM object
>>- in the Destroy method of COM object free timer object
>>- in the methods of COM object you can access internal timer object. Timer event of timer should fire even when COM object is remote.
>
>Thanks for the response. I was creating the timer object incorrectly and had to fix it. Also there is new class to subclass from called "session". I believe this automatically takes care of making sessions for you.
>
>And I have one more question. How does the destroy method get invoked? And how do I unload the COM component from memory?
>
>Again thanks for your help.
>
>Costas Menico

The Destroy is invoked when you release the assigned variable or set it to .NULL.. I also create a Release method in my baseclasses for those classes that don't have one with the following code:
Release THIS
Credit for this goes to Drew Speedie who taught me this a few years ago. (He may or may not have learned it from someone else.)
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform