Thread overview | |||||
---|---|---|---|---|---|
|
August 02, 2007 comstl::bstr attach method? | ||||
---|---|---|---|---|
| ||||
Hello! Is there a way to attach a BSTR to the comstl::bstr class? I didn't find an attach method, and if I pass a BSTR to the constructor then a copy of the string is made. So Long... Gabor |
August 02, 2007 Re: comstl::bstr attach method? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gabor Fischer | Gabor Fischer Wrote:
> Hello!
>
>
> Is there a way to attach a BSTR to the comstl::bstr class? I didn't find an attach method, and if I pass a BSTR to the constructor then a copy of the string is made.
Yes, you're right. For the moment you can _probably_ - I haven't tested this - do something like:
comstl::bstr s;
BSTR bs = ::SysAllocString(L"abc");
*s.DestructiveAddress() = bs;
But you're quite right that an attach() method is called for. I will do just that at the weekend, and also upgrade the help for this class (and release the 1.9.5 help on site, as well, I think).
Cheers
Matt
|
April 25, 2009 Re: comstl::bstr attach method? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gabor Fischer | This was added with STLSoft 1.9.5. Sorry for not responding earlier "Gabor Fischer" <Gabor.Fischer@systecs.com> wrote in message news:AM5NSKY$QNB@systecs.com... > Hello! > > > Is there a way to attach a BSTR to the comstl::bstr class? I didn't find an attach method, and if I pass a BSTR to the constructor then a copy of the string is made. > > > So Long... > > Gabor > |
Copyright © 1999-2021 by the D Language Foundation