git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2958
91ce42f0-d328-0410-95d8-
f526ca767f89
--- /dev/null
+/*
+ * Minimal replacement for class CComPtr and CComBSTR
+ * Based on common public IUnknown interface only
+ */
+
+template <class T> class CComPtr
+{
+
+public:
+
+/* Attribute(s) ... */
+ T* p;
+
+/* Creation ... */
+ CComPtr()
+ {
+ p = NULL;
+ }
+
+/* Destructor ... */
+ ~CComPtr()
+ {
+ if (p)
+ p->Release();
+ }
+};
+
+class CComBSTR
+{
+
+public:
+
+ BSTR p;
+
+/* Creation ... */
+ CComBSTR()
+ {
+ p = NULL;
+ }
+
+/* Destructor ... */
+ ~CComBSTR()
+ {
+ ::SysFreeString(p);
+ }
+
+/* Address-of operator */
+ BSTR* operator&()
+ {
+ return &p;
+ }
+
+};