Passing a BSTR parameter to a COM method
Posted on 2003-03-03
I have to pass a BSTR string which is read from a xml file(using simple C-style fopen,fgetws methods) to a COM method. Within the COM method this BSTR string is to be passed further to a method that takes _bstr_t as a parameter. The problem arises when the BSTR string is to be passed further to the method contained within the COM method. The conversion from BSTR to _bstr_t converts only a portion of the string and not the complete string. How do I solve this problem??
Thanks and Regards,