Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with VFP and Excel 2000?...
Message
 
À
23/12/1999 14:49:34
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00308023
Message ID:
00308202
Vues:
70
>Humor me :-)
>
>Try PUBLIC oExcel rather than LOCAL oExcel.

I would but I'm at home now and trying to do CREATEOBJECT() freezes VFP. However, I do think that I may have figured out the problem, so humor me. Remember that the server is subclassed like this:
DEFINE CLASS ExcelServer AS CUSTOM
oServer = NULL

FUNCTION Init

This.oServer = CREATEOBJECT('Excel.Application')
RETURN NOT ISNULL(This.oServer)
ENDFUNC
* Methods here
ENDDEFINE
OK, now using this as the model, create the oExcel via CREATEOBJECT('ExcelServer'). Issue the quit via oxl (or whatever) with oxl.oServer.Quit(), then oxl = NULL. If you check the Task Manager, I'll bet that there's an instance of Excel still hanging around.

What I think is needed is a Destroy procedure with an explicit This.oServer = NULL in it. For some reason, I think that the default Destroy isn't properly taking care of things. This isn't uncommon in C++, but I've never encountered it in VFP.

If you (or anyone else) could test this (since I can't), it'd be appreciated.

PS - I'm wondering if my inability to do this has anything to do with the "rat" driver (no kidding).
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform