Dear Friends;
There is Dll in VC++ which i am accessing in VB.I need to call a function from that DLL which returns me a String.Which String Datatype should i use in VC++ so that i can recieve it VB as string or variant.
Please help me ASAP.
Pavan
Printable View
Dear Friends;
There is Dll in VC++ which i am accessing in VB.I need to call a function from that DLL which returns me a String.Which String Datatype should i use in VC++ so that i can recieve it VB as string or variant.
Please help me ASAP.
Pavan
You should always use the BSTR type. You can simply create such a datatype by writing
CString ReturnString = "abc";
return ReturnString.AllocSysString();
This will automatically create a BSTR type.