From: Kern S. <ke...@us...> - 2006-04-22 16:26:39
|
Update of /cvsroot/bacula/bacula/src/win32/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10470 Added Files: ms_atl.h Log Message: Add ms_atl.h --- NEW FILE: ms_atl.h --- /* * 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; } }; |