Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public User Defined Property
Message
De
03/07/2002 09:36:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Public User Defined Property
Divers
Thread ID:
00674913
Message ID:
00674913
Vues:
56
Hi All,

I have created a COM server in VFP. A path to a VFP database is passed to the init method of the COM object. The init method then calls another method to see if the path is valid (DIRECTORY(tcPath)). If the path is not valid, I want to return some type of error that I can trap in Excel or Word.

I created a new property called cStatus that is initialized to an empty string. If the method that attempts to open a database using the path that was passed to the init method is invalid, I stuff the cStatus property with some text indicating that the path is invalid.

So far, so good. Now if I instantiate the class in vfp, the cStatus propety is updated correctly. However, in Excel (or VFP for that matter), if I instaniate the com server and pass a bad path to the init of the com object, the cStatus propety is never updated. It always contains an empty string.

Is there some way for the client to know if the path is invalid? How do I return something letting the client (Excel or Word) know there is a problem.

By the way the visibility of cStatus is public.

Thanks,
Pat Moran
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform