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:
01250433
Vues:
15
Hi 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

regards,
Gerard


>Hi,
>
>The 'ref' was meant for the .NET call.
>My VFP is getting a bit rusty I'm afraid. Does the following work:
>FUNCTION MyRoutine(param1 as String,param2 as Variant @)
>
>
>
>>I changed the calling routine to your suggestion but got a complier
>> error message in dot net
>> argument '2' should not be passed with the 'ref' keyword.
>>
>>I then tried to change the VFP routine parameter line to:
>>FUNCTION MyRoutine(param1 as String,ref param2 as String)
>>by inserting the -->ref <--- keyword but it gives a complier error.
>>
>>Any ideas ??
>>Regards,
>>Gerard
>>
>>
>>
>>>
>MyVfpDll(MyInputParam,ref MyOutputParam)
>>>
>>>
>>>>I have a VFP DLL thats working fine being called from within a Dot Net App, and am passing in a parameter as in:
>>>>string MyInputParam;
>>>>MyInputParam = "100"
>>>>MyVfpDll(MyInputParam)
>>>>..this works great.
>>>>
>>>>I also want to pass an Output paramater as in
>>>>string MyOutputParam
>>>>MyOutputparam = "Blank Now"
>>>>MyVfpDll(MyInputParam,MyOutputParam)
>>>>...at this stage MyOutPutparm should have something different
>>>>
>>>>However, even though MyOutputParam gets changed in the VFP dll,after returning from the DLL, it has not changed in .Net.
>>>>
>>>>Anybody know if theres something else I need to do ?
>>>>Regards,
>>>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform