Link to home
Start Free TrialLog in
Avatar of Sohela
Sohela

asked on

convert char** to BSTR

how to convert char** to BSTR
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sohela
Sohela

ASKER

hey thanks a lot got it
Fine, that's great.
You could also use one of the BSTR wrapper classes such as CComBSTR or _bstr_t, both of which can take a char* in the constructor:

char ** ppChar;

...

CComBSTR myComBSTR(*ppChar);

_bstr_t my_bstr_t(*ppChar);

Then you get all of the other functionality of the classes, including the ability to detach the underlying BSTR if you need it.