Dec 6, 2005 #1 C Cortex Full Member level 3 Joined Mar 26, 2005 Messages 182 Helped 12 Reputation 24 Reaction score 4 Trophy points 1,298 Location Morocco Activity points 2,733 ansistring to bstr IN C++ Builder i want to convert a Ansistring (a editbox) to a BSTR i already know how to make a BSTR BSTR temp; temp = SysAllocString(L"My text"); but i want to put random text so how can i do it Thanks in advance
ansistring to bstr IN C++ Builder i want to convert a Ansistring (a editbox) to a BSTR i already know how to make a BSTR BSTR temp; temp = SysAllocString(L"My text"); but i want to put random text so how can i do it Thanks in advance
Dec 7, 2005 #2 Q quba54 Newbie level 5 Joined Apr 15, 2004 Messages 9 Helped 1 Reputation 2 Reaction score 0 Trophy points 1,281 Activity points 81 convert ansistring to bstr AnsiString str; BSTR wstr; str="Hello"; wstr=(BSTR)WideString(str);
Dec 7, 2005 #3 C Cortex Full Member level 3 Joined Mar 26, 2005 Messages 182 Helped 12 Reputation 24 Reaction score 4 Trophy points 1,298 Location Morocco Activity points 2,733 bstr c++ builder Thanks for your help i used (TVariant) it better