https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c92d5c14a6a7eda627f755453b69ac4ec4b8863

commit 6c92d5c14a6a7eda627f755453b69ac4ec4b8863
Author: Mark Jansen <[email protected]>
AuthorDate: Sun Dec 24 01:27:06 2017 +0100

    [ATL] Add CComBSTR.Attach
---
 sdk/lib/atl/atlcomcli.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sdk/lib/atl/atlcomcli.h b/sdk/lib/atl/atlcomcli.h
index 9c19e3371c..20151dba9f 100644
--- a/sdk/lib/atl/atlcomcli.h
+++ b/sdk/lib/atl/atlcomcli.h
@@ -301,6 +301,12 @@ public:
         return *this;
     }
 
+    void Attach(BSTR bstr)
+    {
+        ::SysFreeString(m_str);
+        m_str = bstr;
+    }
+
     BSTR Detach()
     {
         BSTR str = m_str;

Reply via email to