passing strings to ole com server

G

Guest

i need to create a com server dll from some vfp code

i have sucessufly compiled and run one example i found

i am having a problem adapting this to my needs.

basically, i have one function i am calling which needs a string as a prameter
it then does some processing and returns another string

vb.net code
Dim cString As String = ""
cString = oScanData.ValidateShipID(UserInput)

vfp code
PROCEDURE ValidateShipID() AS String

everything shows up fine in the editor, yet the com server thows an datatype
mismatch error and in debuging it thinks its getting a logical value

what is wrong with my calling code?
 
G

Guest

got it...

vfp code was:
PROCEDURE ValidateShipID() AS String
lparameters ShipID

changed to...
PROCEDURE ValidateShipID(ShipID as String) AS String

and it works

continuing to get a .net mindset....

clue now = .02
 
T

Tom Shelton

i need to create a com server dll from some vfp code

i have sucessufly compiled and run one example i found

i am having a problem adapting this to my needs.

basically, i have one function i am calling which needs a string as a prameter
it then does some processing and returns another string

vb.net code
Dim cString As String = ""
cString = oScanData.ValidateShipID(UserInput)

vfp code
PROCEDURE ValidateShipID() AS String

your vfp procedure returns a string - but, it doesn't appear to take
one. If that isn't a typo - then I believe you need to modify your
vfp procedure to take a string (i don't know vfp - so, I can't really
help there :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top