Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing a COM exe
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00750043
Message ID:
00751102
Vues:
22
Bill,

What happens if you make your COM component a class derived from Form instead and have your Timer as an object inside the form?

>I have a VFP7 COM class based off of a timer that I am calling from a c# service. I am having a hard time releasing the exe from c#. I have added a Quit method to my class which closes resources and even calls quit, but I still see my VFP exe in the task manager.
>Any ideas?
>
>This is about what I am doing
>
>**VFP Class
>
>DEFINE CLASS myTimer as Timer OLEPUBLIC
>FUNCTION INIT
>  this.enabled = .t.
>  this.interval = 2000
>ENDFUNCTION
>FUNCTION TIMER
>...
>ENFUNCTION
>FUNCTION Quit()
>  this.enabled = .f.
>  CLOSE TABLES
>  RELEASE ALL EXTENDED
>
>  QUIT
>ENDFUNCTION
>
>ENDDEFINE
>
>
>then from c# in the stop method
>
>if (this.objMyTimer != null)
>{
>  this.objMyTimer.Quit();
>  this.objMyTimer = null;
>}
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform