int _tmain()
{
String* str= "Hello World";
const wchar_t __pin* pin = PtrToStringChars(str);
BSTR bstr = SysAllocString(pin);
// Use the BSTR here
SysFreeString(bstr);
return 0;
}
--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
"Glenn" <la****@cox.net> wrote in message
news:21**************************@posting.google.c om...
I am a new to C++.
I wrote the following code in my function.
BSTR bstr1;
System::String * order[,] = new String* [1000,2];
bstr1 = order[row1,1]->ToString();
When I try to build the function I get an Error saying I cannot
convert from System::String to BSTR on the 3rd line. Is this possible
to convert if so how?
Thanks,
Glenn