Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test for Excel instance?
Message
De
27/02/2002 11:32:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00621712
Message ID:
00625804
Vues:
18
>>>>Use createobject instead. To use the same instance use workbooks collection (add, open).

>Cetin,
>
>I'm not sure if this answers Gary's question (I'm cc-ing him), but for myself, I don't bother with GETOBJECT for Office 2000 because opening a file simply spawns another instance of Excel or Word.

George,
I agree with you :) Unoffically I could say they spawn too :)
For a specific project I had to deal with both of them at lowlevel down to their ProcessId, ThreadId's. Their windowing, PID usage etc differ (Finally I ended with creating a .FLL).

I have a very simple reason not to try to use GetObject() :
ox=GetObject(,'Excel.application')
-Excel doesn't exist. So far so good I get the OLE error. This only helps me finding out there isn't Excel around which I could safely do with FindWindow() API.
-Excel exists and launched by say independendantly from VFP. User was working with it and I get the ox !!! Good, NO. As soon as user shuts down it I'm at a lost with a bomb ticking in my hands :)

PS: Your reference KB problem not only occurs with automation servers but with ActiveX as well. I haven't tried but would bet if 'loCell = .NULL.' was in loop it'd relase properly - I hope :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform