Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I tell if a COM object is running?
Message
 
To
05/06/2001 11:32:27
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00515028
Message ID:
00515201
Views:
31
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform