Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling DLL function compiled in VFP from VB
Message
De
21/04/2005 10:27:22
Rakesh Pahwa
Symco Software P. Ltd.
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Calling DLL function compiled in VFP from VB
Divers
Thread ID:
01006998
Message ID:
01006998
Vues:
110
I have created a function which requires 3 parameters, 2 by value and one by reference.

This has been compiled as a DLL file.

While calling this function from VFP I pass on the third parameter by @ prefixed to it and the function returns with the value of third parameter updated.

Now I want to deploy this DLL from VB. By default the declaration of SUB in VB requires the calling methodolgy to be announced as BYREF or BYVAL. However the calling statement does not seem to have the option.

e.g. VFP function
Local mystr = 'Hello'
? myfunction(5,4,@mystr) => 9
? mystr => "Hello World"

Define Class MyClass
MyFunction(a,b,c)
result = a+b
c = c + " World"
Return result
END DEFINE


In VB
Registered MyDll.dll
Dim Mystr = "Hello"
Dim myobject = mydll.myclass
myobject.myfunction(5,4,Mystr) does not change the value of mystr
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform