General information
Category:
Coding, syntax & commands
Title:
Calling DLL function compiled in VFP from VB
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only