Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test for COM server
Message
From
11/06/1999 11:26:50
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00228773
Message ID:
00228815
Views:
18
>Can you trap this error with your regular error handler?
>
>Joe
>

Actually, I did a bit more research after posting and found a thread from
Jan. 11, 1999, 'How to detect a dead object'. This is one of those that a
regular error handler doesn't work well on. Also, TYPE("owordobj") returns "O" even if the Word server was killed, and ISNULL doesn't work either.

Jim Booth's solution is to check a known property of the object and this works great. TYPE("owordobj.name") = "C" returns .t. if the word server is still alive, and false if it was killed or otherwise died . This works for references to Word docs too.
D. Frankenbach suggested trapping the error in the error method of the class, and Hacker's Guide has an example. In the error method, you can check for
nError = 1427 or 1429 which are Ole errors, and handle things from there.

Thanks,

Rod Poujade
Montreal, Canada
Rod Poujade
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform