Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing variables
Message
De
21/11/2002 10:55:54
 
 
À
21/11/2002 10:30:44
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00725134
Message ID:
00725255
Vues:
14
Your local variable must be initialized to a numeric value before passing it to the COM method:
LOCAL MyVar
MyObj = CREATEOBJECT ("MyCOM.SomeClass")
MyObj.SomeMethod (@MyVar)   && SomeMethod assign 1 to MyVar
? MyVar && Print out .T.
LOCAL MyVar
MyVar = 0
MyObj = CREATEOBJECT ("MyCOM.SomeClass")
MyObj.SomeMethod (@MyVar)   && SomeMethod assign 1 to MyVar
? MyVar && Print out 1
HTH

>That's what I thought.
>
>Only I'm sending a local variable using @ to a COM I created in VFP, and it returns as value .T., when it should be a numeric.
>
>When I test this using the class library directly from Fox, it works, but when I access the DLL, it fails.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform