Hi guys..i facing a problem here.i cant convert const char * to BSTR.
let say for e.g:
x - const char *
y - BSTR
i pass the variable x to another function and takes it as y.
method1(BSTR(x));
::method1(BSTR y)
{
}
the problem y is not getting the same value as sent in x. I think there is some problem when converting const char * to BSTR.
Guys do help me..
Thanks..
Yes there is - because they are both pointers.
Converting a char* to BSTR is possible BUT they will both point to the same data - BUT the data will be
in the wrong format for BSTR.
Here is the definition of BSTR: A BSTR is a pointer to a null-terminated character string in which the
string length is stored with the string. Because the length is stored with
the string, BSTR variables can contain embedded null characters.
Thanks for ur kind information guestgulkan...can u suggest me any documents where i can get better undestanding of BSTR, char*,UString, CString which is related to data manipulation.
Thanks.