CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    26

    Converting BSTR to CString


    How do I convert BSTR to CString?

    Thnaks in advance...


  2. #2
    Join Date
    May 1999
    Posts
    26

    Re: Converting BSTR to CString


    Cool...
    Nevermind!!

    I got it!!



  3. #3
    Join Date
    May 1999
    Posts
    22

    Re: Converting BSTR to CString

    It is nice to know that u found the answer yourself.
    Why don't u share it with me.

    Thanking you in advance


  4. #4
    Join Date
    May 1999
    Posts
    26

    Re: Converting BSTR to CString

    Suppose bstr is the BSTR to be converted. Then

    CString str = (char*)bstr;

    Simple, isn't it?

    Santhosh



  5. #5
    Join Date
    May 1999
    Posts
    22

    Re: Converting BSTR to CString

    Well, Thank u.
    How to convert CString to BSTR.

    TIA


  6. #6
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: Converting BSTR to CString

    ---
    BSTR strNew ;
    CString strTemp("Hello!");

    strNew = strTemp.AllocSysString();


    ---





    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured