Hi,
I have a VB app that needs to call a function written in VC++.The VB app passes an int and the function returns a LPSTR.
e.g VB passes 1 to the function which returns "st".Similarly, for 2, "nd" is returned,etc..that The function works fine but problem is it returns junk char after the string.So, I am not able to append any strings to this variable in VB.
eg.Instead of "2nd day" I am getting only "2nd".I'm padding up the LPSTR with nulls in my code.
Is this a problem with calling conventions of VB and VC++?BSTR and LPSTR?
Thanx in advance
----Sanjeev
I have a VB app that needs to call a function written in VC++.The VB app passes an int and the function returns a LPSTR.
e.g VB passes 1 to the function which returns "st".Similarly, for 2, "nd" is returned,etc..that The function works fine but problem is it returns junk char after the string.So, I am not able to append any strings to this variable in VB.
eg.Instead of "2nd day" I am getting only "2nd".I'm padding up the LPSTR with nulls in my code.
Is this a problem with calling conventions of VB and VC++?BSTR and LPSTR?
Thanx in advance
----Sanjeev