Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXE COM crashes
Message
De
27/08/1999 21:18:34
 
 
À
27/08/1999 12:07:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00258472
Message ID:
00258724
Vues:
19
Are any of the objects being instantiated in the Init using any Global SET Commands?


>I've created a COM that is used to send data through the modem. The COM is build as a EXE and it use the MSComm object. It work great, except that when I quit it, it give me an error message (This application has caused an illegal operation and will be shut down...). If I build the COM as a DLL, it doesn't give me this error message.
>
>To get this COM to work, I have used the VFPCOM.BindEvents(). I have also used some DOEVENTS, this command is not allowed in a DLL, so that's why I'm stuck with a EXE.
>
>Here is the code in the Init():
>
>THIS.ModemComm = NEWOBJECT("MSCOMMLib.MSComm")
>THIS.EventHandler = NEWOBJECT("OnComm", "Comm")
>THIS.VFPCOM = NEWOBJECT("VFPCOM.ComUtil")
>THIS.VFPCOM.BindEvents(THIS.ModemComm, THIS.EventHandler)
>
>And here is the Destroy():
>
>THIS.VFPCOM.UnBindEvents(THIS.ModemComm, THIS.EventHandler)
>THIS.VFPCOM = NULL
>THIS.EventHandler = NULL
>THIS.ModemComm = NULL
>
>If I comment out these lines in the Init() and Destroy(), I don't get the error, so I guess that something there is causing me problems. It crashes also if I don't put code in the Destroy() event.
>
>Help...
>
>TIA
- Jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform