Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test for COM server
Message
De
11/06/1999 11:26:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00228773
Message ID:
00228815
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform