Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I tell if a COM object is running?
Message
 
À
05/06/2001 11:32:27
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00515028
Message ID:
00515201
Vues:
32
>Nick
>
>This Init() code:
>
>
>strtofile("In ImpactCOM.Init" + chr(13)+chr(10),"impactcom.log")
>IF ! dodefault()
>	RETURN .F.
>ENDIF
>	
>strtofile("ImpactCOM created" + chr(13)+chr(10),"impactcom.log",.t.)
>
>
>Since I can run a FOPEN on the DLL file and get a file handle, I guess the COM server is not running.
>
>If I attempt to create the COM application class from VFP, there are no errors.
>
>Doesn't the COM server try to run after compilation of the DLL?

As others say - no, it does not run automatically after compiling. You have to instantiate it.

oMyCOM = CREATEOBJECT("MyComProject.ImpactCOM")

Then you can check, for example, for TYPE("oMyCOM")= "O" AND !ISNULL(oMycom), or check any of it's properties.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform