diff options
Diffstat (limited to 'CPP/Windows/COM.h')
-rwxr-xr-x | CPP/Windows/COM.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/CPP/Windows/COM.h b/CPP/Windows/COM.h index 2f99905a..06d22ff3 100755 --- a/CPP/Windows/COM.h +++ b/CPP/Windows/COM.h @@ -8,6 +8,8 @@ namespace NWindows { namespace NCOM { +#ifdef _WIN32 + class CComInitializer { public: @@ -22,10 +24,10 @@ public: bool _mustBeReleased; CStgMedium(): _mustBeReleased(false) {} ~CStgMedium() { Free(); } - void Free() - { - if(_mustBeReleased) - ReleaseStgMedium(&_object); + void Free() + { + if(_mustBeReleased) + ReleaseStgMedium(&_object); _mustBeReleased = false; } const STGMEDIUM* operator->() const { return &_object;} @@ -33,6 +35,8 @@ public: STGMEDIUM* operator&() { return &_object; } }; +#endif + ////////////////////////////////// // GUID <--> String Conversions UString GUIDToStringW(REFGUID guid); |