11 #ifndef _CCOMVARIANT_H_ 12 #define _CCOMVARIANT_H_ 55 #ifndef NO_WCHAR_SUPPORT 159 bstrVal = ::SysAllocString(bstrSrc);
172 bstrVal = ::SysAllocString(lpszSrc);
182 #ifndef NO_WCHAR_SUPPORT 187 std::string lInpuStr = lpszSrc;
188 const size_t lSize = lInpuStr.size();
189 wchar_t lBuffer[lSize + 1];
192 mbstowcs(lBuffer, lInpuStr.c_str(), lSize + 1);
193 std::wstring lStr(lBuffer);
195 *
this = lStr.c_str();
350 return (::SysStringByteLen(
bstrVal) == ::SysStringByteLen(varSrc.
bstrVal)) &&
388 memmove(
this, pSrc,
sizeof(
VARIANT));
402 memmove(pDest,
this,
sizeof(
VARIANT));
448 std::stringstream oss;
450 std::string lstring =
"";
483 char* lpText = (
char*)malloc(wcslen(
bstrVal) + 1);
484 wcstombs(lpText,
bstrVal, size + 1);
487 char* lpText = (
char*)malloc(size+1);
489 strncpy(lpText, lstrVal.c_str(), size);
Definition: Msi_variant.h:90
CComVariant & operator=(LPCSTR lpszSrc)
Definition: Msi_ccomvariant.h:183
IUnknown FAR * punkVal
Definition: Msi_variant.h:165
CComVariant(BSTR bstrSrc)
Definition: Msi_ccomvariant.h:49
Definition: Msi_variant.h:100
Definition: Msi_variant.h:91
OLECHAR __RPC_FAR * BSTR
Definition: PDCwtypes.h:401
CComVariant & operator=(double dblSrc)
Definition: Msi_ccomvariant.h:266
CComVariant & operator=(const VARIANT &varSrc)
Definition: Msi_ccomvariant.h:149
HRESULT Attach(VARIANT *pSrc)
Definition: Msi_ccomvariant.h:381
Definition: Msi_variant.h:98
WINOLEAUTAPI DLL_MSICOM_EXIM VariantClear(VARIANTARG *pvarg)
HRESULT Detach(VARIANT *pDest)
Definition: Msi_ccomvariant.h:395
CComVariant & operator=(IDispatch *pSrc)
Definition: Msi_ccomvariant.h:289
SHORT iVal
Definition: Msi_variant.h:154
LONG lVal
Definition: Msi_variant.h:155
bool operator!=(const VARIANT &varSrc) const
Definition: Msi_ccomvariant.h:372
CComVariant & operator=(int nSrc)
Definition: Msi_ccomvariant.h:210
unsigned char BYTE
Definition: PDCwtypes.h:108
std::string ToString()
Definition: Msi_ccomvariant.h:446
bool operator==(const VARIANT &varSrc) const
Definition: Msi_ccomvariant.h:315
unsigned long Lo
Definition: PDCwtypes.h:263
~CComVariant()
Definition: Msi_ccomvariant.h:32
long HRESULT
Definition: FragmentedString.h:20
#define VARCMP_GT
Definition: Msi_variant.h:229
WINOLEAUTAPI DLL_MSICOM_EXIM VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
Definition: Msi_variant.h:133
CComVariant(LPCSTR lpszSrc)
Definition: Msi_ccomvariant.h:63
#define ATLASSERT(expr)
Definition: Msi_atldef.h:18
CComVariant(bool bSrc)
Definition: Msi_ccomvariant.h:69
#define VARCMP_LT
Definition: Msi_variant.h:227
Definition: Msi_variant.h:94
CComVariant(const SAFEARRAY *pSrc)
Definition: Msi_ccomvariant.h:128
Definition: Msi_variant.h:106
WINOLEAUTAPI DLL_MSICOM_EXIM VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvarSrc, USHORT wFlags, VARTYPE vt)
CComVariant & operator=(bool bSrc)
Definition: Msi_ccomvariant.h:199
CComVariant(double dblSrc)
Definition: Msi_ccomvariant.h:101
CComVariant(CY cySrc)
Definition: Msi_ccomvariant.h:106
unsigned short VARTYPE
Definition: Msi_variant.h:32
#define S_OK
Definition: PDCwinerror.h:31
#define VARIANT_FALSE
Definition: PDCwtypes.h:406
Definition: Msi_variant.h:92
Definition: Msi_objidl.h:80
#define FAILED(Status)
Definition: PDCwinerror.h:47
CComVariant()
Definition: Msi_ccomvariant.h:28
BYTE bVal
Definition: Msi_variant.h:153
#define LOCALE_USER_DEFAULT
Definition: PDCwinnt.h:319
FLOAT fltVal
Definition: Msi_variant.h:157
Definition: Msi_oaidl.h:95
Definition: Msi_variant.h:101
VARTYPE vt
Definition: Msi_variant.h:148
HRESULT Clear()
Definition: Msi_ccomvariant.h:379
void InternalCopy(const VARIANT *pSrc)
Definition: Msi_ccomvariant.h:436
CY cyVal
Definition: Msi_variant.h:161
CComVariant & operator=(IUnknown *pSrc)
Definition: Msi_ccomvariant.h:300
SAFEARRAY FAR * parray
Definition: Msi_variant.h:167
Definition: Msi_variant.h:99
Definition: Msi_variant.h:103
CComVariant(const VARIANT &varSrc)
Definition: Msi_ccomvariant.h:37
#define SUCCEEDED(Status)
Definition: PDCwinerror.h:42
long Hi
Definition: PDCwtypes.h:264
WINOLEAUTAPI DLL_MSICOM_EXIM VarCmp(LPVARIANT left, LPVARIANT right, LCID lcid, DWORD flags)
CComVariant & operator=(long nSrc)
Definition: Msi_ccomvariant.h:244
HRESULT ChangeType(VARTYPE vtNew, const VARIANT *pSrc=NULL)
Definition: Msi_ccomvariant.h:409
CComVariant & operator=(BYTE nSrc)
Definition: Msi_ccomvariant.h:222
const CHAR __RPC_FAR * LPCSTR
Definition: PDCwtypes.h:367
IDispatch FAR * pdispVal
Definition: Msi_variant.h:166
SCODE scode
Definition: Msi_variant.h:160
bool operator<(const VARIANT &varSrc) const
Definition: Msi_ccomvariant.h:374
Definition: Msi_variant.h:97
bool operator>(const VARIANT &varSrc) const
Definition: Msi_ccomvariant.h:375
CComVariant & operator=(CY cySrc)
Definition: Msi_ccomvariant.h:277
CComVariant(float fltSrc)
Definition: Msi_ccomvariant.h:96
#define E_OUTOFMEMORY
Definition: PDCwinerror.h:114
WINOLEAUTAPI DLL_MSICOM_EXIM SafeArrayGetVartype(SAFEARRAY *psa, VARTYPE *pvt)
Definition: Msi_oaidl.h:41
VARIANT_BOOL boolVal
Definition: Msi_variant.h:159
CComVariant & operator=(const CComVariant &varSrc)
Definition: Msi_ccomvariant.h:144
Definition: Msi_variant.h:95
#define VARIANT_TRUE
Definition: PDCwtypes.h:405
CComVariant(BYTE nSrc)
Definition: Msi_ccomvariant.h:80
Definition: Msi_variant.h:147
Definition: Msi_variant.h:96
CComVariant(LPCOLESTR lpszSrc)
Definition: Msi_ccomvariant.h:56
CComVariant(IUnknown *pSrc)
Definition: Msi_ccomvariant.h:120
Definition: Msi_variant.h:93
Definition: Msi_ccomvariant.h:24
HRESULT WriteToStream(IStream *pStream)
virtual ULONG STDMETHODCALLTYPE AddRef(void)=0
HRESULT Copy(const VARIANT *pSrc)
Definition: Msi_ccomvariant.h:380
HRESULT ReadFromStream(IStream *pStream)
HRESULT InternalClear()
Definition: Msi_ccomvariant.h:424
const OLECHAR __RPC_FAR * LPCOLESTR
Definition: PDCwtypes.h:394
CComVariant & operator=(float fltSrc)
Definition: Msi_ccomvariant.h:255
CComVariant & operator=(BSTR bstrSrc)
Definition: Msi_ccomvariant.h:155
CComVariant(int nSrc)
Definition: Msi_ccomvariant.h:75
CComVariant & operator=(LPCOLESTR lpszSrc)
Definition: Msi_ccomvariant.h:168
CComVariant(short nSrc)
Definition: Msi_ccomvariant.h:85
DOUBLE dblVal
Definition: Msi_variant.h:158
Definition: Msi_oaidl.h:510
#define NULL
Definition: Null.h:10
CComVariant(long nSrc, VARTYPE vtSrc=VT_I4)
Definition: Msi_ccomvariant.h:90
CComVariant(IDispatch *pSrc)
Definition: Msi_ccomvariant.h:112
DATE date
Definition: Msi_variant.h:162
Definition: PDCwtypes.h:261
CComVariant(const CComVariant &varSrc)
Definition: Msi_ccomvariant.h:43
CComVariant & operator=(short nSrc)
Definition: Msi_ccomvariant.h:233
BSTR bstrVal
Definition: Msi_variant.h:163