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

    Is OLE2CT valid when used with BSTR

    I am using BSTRs in my application in several places. In some situations I want to go back and forth between BSTRS and LPCTSTRs to go from BSTR to LPCTSTR I use the macro OLE2CT. Is this the correct macro to use for this conversion? Or does this not apply to BSTRs


  2. #2
    Join Date
    May 1999
    Posts
    19

    Re: Is OLE2CT valid when used with BSTR

    A BSTR is simply an OLECHAR* with a prepended size. In other words, you can treat a BSTR as an OLECHAR* just not the other way around.

    So, you can use any of the OLE2xxx conversion macros on a BSTR.

    -- Matt



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