passing strings to ole com server

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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 :)
 
Back
Top