[ATL] Add CComBSTR.Attach
authorMark Jansen <mark.jansen@reactos.org>
Sun, 24 Dec 2017 00:27:06 +0000 (01:27 +0100)
committerMark Jansen <mark.jansen@reactos.org>
Mon, 25 Dec 2017 13:00:51 +0000 (14:00 +0100)
sdk/lib/atl/atlcomcli.h

index 9c19e33..20151db 100644 (file)
@@ -301,6 +301,12 @@ public:
         return *this;
     }
 
         return *this;
     }
 
+    void Attach(BSTR bstr)
+    {
+        ::SysFreeString(m_str);
+        m_str = bstr;
+    }
+
     BSTR Detach()
     {
         BSTR str = m_str;
     BSTR Detach()
     {
         BSTR str = m_str;