Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[C++]AnsiString to BSTR

Status
Not open for further replies.

Cortex

Full Member level 3
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
 

convert ansistring to bstr

AnsiString str;
BSTR wstr;

str="Hello";

wstr=(BSTR)WideString(str);
 

    Cortex

    Points: 2
    Helpful Answer Positive Rating
bstr c++ builder

Thanks for your help
i used (TVariant) it better
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top