Hi,

This may be a beginner question, but I am having problems. I am creating my first, so simple, ATL COM object with MFC support in VC 5.0. I have methods and properties which as in/out parameters utilize BSTR FAR* as strings (because I cannot use CString for VB to work etc.

1. First problem is converting BSTR FAR* to a CString (it just become garbage)
2. Setting a BSTR FAR* value as an out parameter for properties from a CString. I used AllocSysString casted to BSTR * but it filled the BSTR with garbage.
3. Similarly, all my long * parameters are suffering the same fate (garbage).

Can anyone tell me how to do parameter passing where the values are not garbled ? Should I be using VARIANT and VARIANTARG ? If so how ?

Thanks for any help in advance,

Simon