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

    quick BSTR copy question

    hey,
    ive never worked with bstr before and the only thing i know about them is that they are unsigned shorts. how do i copy one bstr to another bstr?
    thanks
    L5


  2. #2
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: quick BSTR copy question

    There are some API calls to do this, but if you are new to them check out the following classes.

    In ATL - CComBSTR,
    In COM - _bstr_t

    Check it out,

    Wayne



  3. #3
    Join Date
    May 1999
    Posts
    69

    Re: quick BSTR copy question

    Just another thing:
    BitStrings are length preceeded (in a wrapper pointer in general at *p-1, and in VC++ 0 terminated (but i'm not sure about VB). So use SysAllocString and SysFreeString to allocate / free properly.
    geeThings

    chrislaw

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