Mercurial > vba-linux
diff src/win32/7zip/7z/CPP/Windows/PropVariant.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/Windows/PropVariant.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,57 @@ 1.4 +// Windows/PropVariant.h 1.5 + 1.6 +#ifndef __WINDOWS_PROPVARIANT_H 1.7 +#define __WINDOWS_PROPVARIANT_H 1.8 + 1.9 +#include "../Common/MyWindows.h" 1.10 +#include "../Common/Types.h" 1.11 + 1.12 +namespace NWindows { 1.13 +namespace NCOM { 1.14 + 1.15 +class CPropVariant : public tagPROPVARIANT 1.16 +{ 1.17 +public: 1.18 + CPropVariant() { vt = VT_EMPTY; wReserved1 = 0; } 1.19 + ~CPropVariant() { Clear(); } 1.20 + CPropVariant(const PROPVARIANT& varSrc); 1.21 + CPropVariant(const CPropVariant& varSrc); 1.22 + CPropVariant(BSTR bstrSrc); 1.23 + CPropVariant(LPCOLESTR lpszSrc); 1.24 + CPropVariant(bool bSrc) { vt = VT_BOOL; wReserved1 = 0; boolVal = (bSrc ? VARIANT_TRUE : VARIANT_FALSE); }; 1.25 + CPropVariant(UInt32 value) { vt = VT_UI4; wReserved1 = 0; ulVal = value; } 1.26 + CPropVariant(UInt64 value) { vt = VT_UI8; wReserved1 = 0; uhVal = *(ULARGE_INTEGER*)&value; } 1.27 + CPropVariant(const FILETIME &value) { vt = VT_FILETIME; wReserved1 = 0; filetime = value; } 1.28 + CPropVariant(Int32 value) { vt = VT_I4; wReserved1 = 0; lVal = value; } 1.29 + CPropVariant(Byte value) { vt = VT_UI1; wReserved1 = 0; bVal = value; } 1.30 + CPropVariant(Int16 value) { vt = VT_I2; wReserved1 = 0; iVal = value; } 1.31 + // CPropVariant(LONG value, VARTYPE vtSrc = VT_I4) { vt = vtSrc; lVal = value; } 1.32 + 1.33 + CPropVariant& operator=(const CPropVariant& varSrc); 1.34 + CPropVariant& operator=(const PROPVARIANT& varSrc); 1.35 + CPropVariant& operator=(BSTR bstrSrc); 1.36 + CPropVariant& operator=(LPCOLESTR lpszSrc); 1.37 + CPropVariant& operator=(bool bSrc); 1.38 + CPropVariant& operator=(UInt32 value); 1.39 + CPropVariant& operator=(UInt64 value); 1.40 + CPropVariant& operator=(const FILETIME &value); 1.41 + 1.42 + CPropVariant& operator=(Int32 value); 1.43 + CPropVariant& operator=(Byte value); 1.44 + CPropVariant& operator=(Int16 value); 1.45 + // CPropVariant& operator=(LONG value); 1.46 + 1.47 + HRESULT Clear(); 1.48 + HRESULT Copy(const PROPVARIANT* pSrc); 1.49 + HRESULT Attach(PROPVARIANT* pSrc); 1.50 + HRESULT Detach(PROPVARIANT* pDest); 1.51 + 1.52 + HRESULT InternalClear(); 1.53 + void InternalCopy(const PROPVARIANT* pSrc); 1.54 + 1.55 + int Compare(const CPropVariant &a1); 1.56 +}; 1.57 + 1.58 +}} 1.59 + 1.60 +#endif