mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 18:06:55 -06:00
21.07
This commit is contained in:
@@ -192,17 +192,29 @@ BSTR CPropVariant::AllocBstr(unsigned numChars)
|
||||
return bstrVal;
|
||||
}
|
||||
|
||||
#define SET_PROP_id_dest(id, dest) \
|
||||
if (vt != id) { InternalClear(); vt = id; } dest = value;
|
||||
|
||||
void CPropVariant::Set_Int32(Int32 value) throw()
|
||||
{
|
||||
SET_PROP_id_dest(VT_I4, lVal);
|
||||
}
|
||||
|
||||
void CPropVariant::Set_Int64(Int64 value) throw()
|
||||
{
|
||||
SET_PROP_id_dest(VT_I8, hVal.QuadPart);
|
||||
}
|
||||
|
||||
#define SET_PROP_FUNC(type, id, dest) \
|
||||
CPropVariant& CPropVariant::operator=(type value) throw() \
|
||||
{ if (vt != id) { InternalClear(); vt = id; } \
|
||||
dest = value; return *this; }
|
||||
{ SET_PROP_id_dest(id, dest); return *this; }
|
||||
|
||||
SET_PROP_FUNC(Byte, VT_UI1, bVal)
|
||||
// SET_PROP_FUNC(Int16, VT_I2, iVal)
|
||||
SET_PROP_FUNC(Int32, VT_I4, lVal)
|
||||
// SET_PROP_FUNC(Int32, VT_I4, lVal)
|
||||
SET_PROP_FUNC(UInt32, VT_UI4, ulVal)
|
||||
SET_PROP_FUNC(UInt64, VT_UI8, uhVal.QuadPart)
|
||||
SET_PROP_FUNC(Int64, VT_I8, hVal.QuadPart)
|
||||
// SET_PROP_FUNC(Int64, VT_I8, hVal.QuadPart)
|
||||
SET_PROP_FUNC(const FILETIME &, VT_FILETIME, filetime)
|
||||
|
||||
HRESULT PropVariant_Clear(PROPVARIANT *prop) throw()
|
||||
|
||||
Reference in New Issue
Block a user