URGENT How to return String from VC++ component to VB client?
I have written a component using Vc++ ATL. I need to return a string to my VB client. The length of this string can vary depending upon the request to the component.
I have declared a function in an interface using VC++ ATL. The declaration is given below
ReceiveReqXML(OLECHAR *poleszReqXML, int iIntReqNbr,OLECHAR** outstr)
NOTE: The last parameter "outstr" was supposed to contain the return string.
When I try to utilize this function from within my VB client, it says "ByRef Argument Type Mismatch". The VB client code is below
Dim outstr As String
Dim iReqNbr As Integer
Dim pwszReqStr As String
outstr = String(255, "x")
iReqNbr = 124
pwszReqStr = "Some String"
Call b.ReceiveReqXML(pwszReqStr, iReqNbr, outstr)
I am novice using VB. Can someone help me with this? I need this very urgent

