Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Output parameters back from Foxpro to Dot Net
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01250281
Message ID:
01250600
Vues:
11
Hi,
I'm afraid I may have confused things with my last message. You should be able to pass strings by reference. The following works. VFP:
DEFINE CLASS StringTest AS CUSTOM OLEPUBLIC
  FUNCTION ChangeString (cReceivedString AS STRING @)
  cReceivedString = "Hello World"
  ENDFUNC
ENDDEFINE
C#:
        static void Main(string[] args)
        {
            string s = "Input String";
            interop.StringTestClass i = new interop.StringTestClass();
            i.ChangeString(ref s);
        }
Note I should has specified cReceivedString AS 'STRING @' not 'VARIANT @'
HTH,
Viv

>I think I have thgis working now, thanks for your help.
>In VS, I initially had param2 as a string and it was complaining
>I chnged to:
>object param2
>param2="abc";
>MyVFP(string param1, ref param2)
>mytextControl.Text x=param2.Tostring();
>
>..and it seems to work fine now and is returning the value from VFP
>Obviously for Return parameters, they have to be defined as objects
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform