13 #error comutil.h header cannot be included under /clr:safe or /clr:pure
16 #if !defined(_INC_COMUTIL)
21 #if !defined(_COM_ASSERT)
24 # define _COM_ASSERT(x) assert(x)
26 # define _COM_ASSERT(x) ((void)0)
30 #if !defined(_SECURE_COMPILER_COM)
32 #define _SECURE_COMPILER_COM 1
35 #if _SECURE_COMPILER_COM && defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L
39 # define _COM_MEMCPY_S(dest, destsize, src, count) memcpy_s(dest, destsize, src, count)
41 # define _COM_PRINTF_S_1(dest, destsize, format, arg1) swprintf_s(dest, destsize, format, arg1)
43 # define _COM_PRINTF_S_1(dest, destsize, format, arg1) sprintf_s(dest, destsize, format, arg1)
48 # define _COM_MEMCPY_S(dest, destsize, src, count) memcpy(dest, src, count)
49 # define _COM_PRINTF_S_1(dest, destsize, format, arg1) wsprintf(dest, format, arg1)
54 #pragma warning(disable: 4290)
55 #pragma warning(disable: 4310)
57 #pragma push_macro("new")
62 #define S_OK ((HRESULT)0L)
64 #ifndef INTSAFE_E_ARITHMETIC_OVERFLOW
65 #define INTSAFE_E_ARITHMETIC_OVERFLOW ((HRESULT)0x80070216L) // 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW
67 #ifndef INTSAFE_UINT_MAX
68 #define INTSAFE_UINT_MAX 0xffffffff
71 #define FAILED(hr) (((HRESULT)(hr)) < 0)
100 static HRESULT
UIntAdd(UINT uAugend, UINT uAddend, UINT *puResult)
102 if((uAugend + uAddend) < uAddend)
106 *puResult = uAugend + uAddend;
110 static HRESULT
UIntMult(UINT uMultiplicand, UINT uMultiplier, UINT *puResult)
112 ULONGLONG ull64Result = UInt32x32To64(uMultiplicand, uMultiplier);
115 *puResult = (UINT)ull64Result;
153 _bstr_t(BSTR bstr,
bool fCopy) ;
178 operator const wchar_t*()
const throw();
179 operator wchar_t*()
const throw();
180 operator const char*()
const ;
181 operator char*()
const ;
195 BSTR
copy(
bool fCopy =
true)
const ;
196 unsigned int length()
const throw();
223 Data_t(
const wchar_t* s) ;
224 Data_t(BSTR bstr,
bool fCopy) ;
229 unsigned long AddRef()
throw();
230 unsigned long Release()
throw();
231 unsigned long RefCount()
const throw();
235 operator const wchar_t*()
const throw();
236 operator const char*()
const ;
246 void Attach(BSTR s)
throw();
247 unsigned int Length()
const throw();
252 void*
operator new(
size_t sz);
271 void _Free() throw();
283 void _Free() throw();
332 : m_Data(new
Data_t(bstr, fCopy))
372 if (s ==
NULL || static_cast<const char*>(*
this) != s)
391 if (s ==
NULL || static_cast<const wchar_t*>(*
this) != s)
415 if (newData ==
NULL) {
470 inline _bstr_t::operator
const wchar_t*()
const throw()
472 return (m_Data !=
NULL) ? m_Data->GetWString() :
NULL;
477 inline _bstr_t::operator
wchar_t*()
const throw()
479 return const_cast<wchar_t*
>((m_Data !=
NULL) ? m_Data->GetWString() :
NULL);
484 inline _bstr_t::operator
const char*()
const
486 return (m_Data !=
NULL) ? m_Data->GetString() :
NULL;
491 inline _bstr_t::operator
char*()
const
493 return const_cast<char*
>((m_Data !=
NULL) ? m_Data->GetString() :
NULL);
647 if (m_Data == str.m_Data) {
651 if (m_Data ==
NULL) {
652 if (str.length() == 0) {
660 if (str.m_Data ==
NULL){
661 if (this->length() == 0) {
669 return m_Data->Compare(*str.m_Data);
681 : m_str(
NULL), m_RefCount(1)
689 : m_str(
NULL), m_RefCount(1)
691 m_wstr = ::SysAllocString(s);
702 : m_str(
NULL), m_RefCount(1)
704 if (fCopy && bstr !=
NULL) {
705 m_wstr = ::SysAllocStringByteLen(reinterpret_cast<char*>(bstr),
706 ::SysStringByteLen(bstr));
708 if (m_wstr ==
NULL) {
720 : m_str(
NULL), m_RefCount(1)
722 const unsigned int l1 = s1.
length();
723 const unsigned int l2 = s2.
length();
733 m_wstr = ::SysAllocStringByteLen(
NULL, (l1 + l2) *
sizeof(
wchar_t));
744 const wchar_t* wstr1 =
static_cast<const wchar_t*
>(s1);
748 _COM_MEMCPY_S(m_wstr, (l1 + l2 + 1) *
sizeof(
wchar_t), wstr1, (l1 + 1) *
sizeof(
wchar_t));
751 const wchar_t* wstr2 =
static_cast<const wchar_t*
>(s2);
755 _COM_MEMCPY_S(m_wstr + l1, (l2 + 1) *
sizeof(
wchar_t), wstr2, (l2 + 1) *
sizeof(
wchar_t));
767 InterlockedIncrement(reinterpret_cast<long*>(&m_RefCount));
773 unsigned long cRef = InterlockedDecrement(reinterpret_cast<long*>(&m_RefCount));
794 inline _bstr_t::Data_t::operator
const wchar_t*()
const throw()
801 inline _bstr_t::Data_t::operator
const char*()
const
835 if (m_wstr !=
NULL) {
836 BSTR bstr = ::SysAllocStringByteLen(reinterpret_cast<char*>(m_wstr), ::SysStringByteLen(m_wstr));
853 m_wstr = ::SysAllocStringByteLen(reinterpret_cast<char*>(s), ::SysStringByteLen(s));
871 return m_wstr ? ::SysStringLen(m_wstr) : 0;
880 const unsigned int l1 = ::SysStringLen(m_wstr);
881 const unsigned int l2 = ::SysStringLen(str.
m_wstr);
883 unsigned int len = l1;
892 if (*bstr1++ != *bstr2++) {
893 return bstr1[-1] - bstr2[-1];
897 return (l1 < l2) ? -1 : (l1 == l2) ? 0 : 1;
902 #ifdef _COM_OPERATOR_NEW_THROWS
903 inline void* _bstr_t::Data_t::operator
new(
size_t sz)
906 return ::operator
new(sz);
912 #else // _COM_OPERATOR_NEW_THROWS
913 inline void* _bstr_t::Data_t::operator
new(
size_t sz)
915 return ::operator
new(sz);
917 #endif // _COM_OPERATOR_NEW_THROWS
930 if (m_wstr !=
NULL) {
931 ::SysFreeString(m_wstr);
1014 _variant_t(
short sSrc, VARTYPE vtSrc = VT_I2) ;
1015 _variant_t(
long lSrc, VARTYPE vtSrc = VT_I4) ;
1017 _variant_t(
double dblSrc, VARTYPE vtSrc = VT_R8) ;
1022 _variant_t(IDispatch* pSrc,
bool fAddRef =
true)
throw();
1024 _variant_t(IUnknown* pSrc,
bool fAddRef =
true)
throw();
1033 #if (_WIN32_WINNT >= 0x0501)
1044 operator short()
const ;
1045 operator long()
const ;
1046 operator float()
const ;
1047 operator double()
const ;
1048 operator CY()
const ;
1050 operator IDispatch*()
const ;
1051 operator bool()
const ;
1052 operator IUnknown*()
const ;
1053 operator DECIMAL()
const ;
1054 operator BYTE()
const ;
1055 operator VARIANT()
const throw();
1057 operator char()
const ;
1058 operator unsigned short()
const ;
1059 operator unsigned long()
const ;
1060 operator int()
const ;
1061 operator unsigned int()
const ;
1062 #if (_WIN32_WINNT >= 0x0501)
1063 operator __int64()
const ;
1064 operator unsigned __int64()
const ;
1092 #if (_WIN32_WINNT >= 0x0501)
1099 bool operator==(
const VARIANT& varSrc)
const throw();
1100 bool operator==(
const VARIANT* pSrc)
const throw();
1102 bool operator!=(
const VARIANT& varSrc)
const throw();
1103 bool operator!=(
const VARIANT* pSrc)
const throw();
1109 void Attach(VARIANT& varSrc) ;
1110 VARIANT
Detach()
throw();
1112 VARIANT& GetVARIANT()
throw();
1115 void ChangeType(VARTYPE vartype,
const _variant_t* pSrc =
NULL) ;
1117 void SetString(
const char* pSrc) ;
1130 ::VariantInit(
this);
1137 ::VariantInit(
this);
1149 ::VariantInit(
this);
1158 ::VariantInit(
this);
1159 _com_util::CheckError(::VariantCopy(
this, const_cast<VARIANT*>(static_cast<const VARIANT*>(&varSrc))));
1168 ::VariantInit(
this);
1172 _COM_MEMCPY_S(
this,
sizeof(varSrc), &varSrc,
sizeof(varSrc));
1173 V_VT(&varSrc) = VT_EMPTY;
1182 if ((vtSrc != VT_I2) && (vtSrc != VT_BOOL)) {
1187 if (vtSrc == VT_BOOL) {
1188 V_VT(
this) = VT_BOOL;
1189 V_BOOL(
this) = (sSrc ? VARIANT_TRUE : VARIANT_FALSE);
1202 if ((vtSrc != VT_I4) && (vtSrc != VT_ERROR) && (vtSrc != VT_BOOL)) {
1207 if (vtSrc == VT_ERROR) {
1208 V_VT(
this) = VT_ERROR;
1209 V_ERROR(
this) = lSrc;
1211 else if (vtSrc == VT_BOOL) {
1212 V_VT(
this) = VT_BOOL;
1213 V_BOOL(
this) = (lSrc ? VARIANT_TRUE : VARIANT_FALSE);
1226 V_R4(
this) = fltSrc;
1234 if ((vtSrc != VT_R8) && (vtSrc != VT_DATE)) {
1239 if (vtSrc == VT_DATE) {
1240 V_VT(
this) = VT_DATE;
1241 V_DATE(
this) = dblSrc;
1245 V_R8(
this) = dblSrc;
1261 V_VT(
this) = VT_BSTR;
1263 BSTR bstr =
static_cast<wchar_t*
>(bstrSrc);
1265 V_BSTR(
this) =
NULL;
1268 V_BSTR(
this) = ::SysAllocStringByteLen(reinterpret_cast<char*>(bstr),
1269 ::SysStringByteLen(bstr));
1270 if (V_BSTR(
this) ==
NULL) {
1280 V_VT(
this) = VT_BSTR;
1282 V_BSTR(
this) = ::SysAllocString(pSrc);
1284 if (V_BSTR(
this) ==
NULL && pSrc !=
NULL) {
1293 V_VT(
this) = VT_BSTR;
1301 V_VT(
this) = VT_DISPATCH;
1302 V_DISPATCH(
this) = pSrc;
1308 if (V_DISPATCH(
this) !=
NULL) {
1309 V_DISPATCH(
this)->AddRef();
1318 V_VT(
this) = VT_BOOL;
1319 V_BOOL(
this) = (boolSrc ? VARIANT_TRUE : VARIANT_FALSE);
1326 V_VT(
this) = VT_UNKNOWN;
1327 V_UNKNOWN(
this) = pSrc;
1333 if (V_UNKNOWN(
this) !=
NULL) {
1334 V_UNKNOWN(
this)->AddRef();
1345 V_DECIMAL(
this) = decSrc;
1346 V_VT(
this) = VT_DECIMAL;
1353 V_VT(
this) = VT_UI1;
1369 V_VT(
this) = VT_UI2;
1370 V_UI2(
this) = usSrc;
1377 V_VT(
this) = VT_UI4;
1378 V_UI4(
this) = ulSrc;
1385 V_VT(
this) = VT_INT;
1393 V_VT(
this) = VT_UINT;
1394 V_UINT(
this) = uiSrc;
1397 #if (_WIN32_WINNT >= 0x0501)
1410 V_VT(
this) = VT_UI8;
1411 V_UI8(
this) = ui8Src;
1423 inline _variant_t::operator short()
const
1425 if (V_VT(
this) == VT_I2) {
1432 return V_I2(&varDest);
1437 inline _variant_t::operator long()
const
1439 if (V_VT(
this) == VT_I4) {
1446 return V_I4(&varDest);
1451 inline _variant_t::operator float()
const
1453 if (V_VT(
this) == VT_R4) {
1460 return V_R4(&varDest);
1465 inline _variant_t::operator double()
const
1467 if (V_VT(
this) == VT_R8) {
1474 return V_R8(&varDest);
1479 inline _variant_t::operator CY()
const
1481 if (V_VT(
this) == VT_CY) {
1488 return V_CY(&varDest);
1495 if (V_VT(
this) == VT_BSTR) {
1496 return V_BSTR(
this);
1502 return V_BSTR(&varDest);
1507 inline _variant_t::operator IDispatch*()
const
1509 if (V_VT(
this) == VT_DISPATCH) {
1510 if (V_DISPATCH(
this) !=
NULL) {
1511 V_DISPATCH(
this)->AddRef();
1513 return V_DISPATCH(
this);
1519 if (V_DISPATCH(&varDest) !=
NULL) {
1520 V_DISPATCH(&varDest)->AddRef();
1523 return V_DISPATCH(&varDest);
1528 inline _variant_t::operator
bool()
const
1530 if (V_VT(
this) == VT_BOOL) {
1531 return V_BOOL(
this) ?
true :
false;
1537 return (V_BOOL(&varDest) == VARIANT_TRUE) ?
true :
false;
1542 inline _variant_t::operator IUnknown*()
const
1544 if (V_VT(
this) == VT_UNKNOWN) {
1545 if (V_UNKNOWN(
this) !=
NULL) {
1546 V_UNKNOWN(
this)->AddRef();
1548 return V_UNKNOWN(
this);
1554 if (V_UNKNOWN(&varDest) !=
NULL) {
1555 V_UNKNOWN(&varDest)->AddRef();
1558 return V_UNKNOWN(&varDest);
1563 inline _variant_t::operator DECIMAL()
const
1565 if (V_VT(
this) == VT_DECIMAL) {
1566 return V_DECIMAL(
this);
1572 return V_DECIMAL(&varDest);
1577 inline _variant_t::operator BYTE()
const
1579 if (V_VT(
this) == VT_UI1) {
1586 return V_UI1(&varDest);
1591 inline _variant_t::operator VARIANT()
const throw()
1593 return *(VARIANT*)
this;
1598 inline _variant_t::operator char()
const
1600 if (V_VT(
this) == VT_I1) {
1607 return V_I1(&varDest);
1612 inline _variant_t::operator
unsigned short()
const
1614 if (V_VT(
this) == VT_UI2) {
1621 return V_UI2(&varDest);
1626 inline _variant_t::operator
unsigned long()
const
1628 if (V_VT(
this) == VT_UI4) {
1635 return V_UI4(&varDest);
1640 inline _variant_t::operator
int()
const
1642 if (V_VT(
this) == VT_INT) {
1649 return V_INT(&varDest);
1654 inline _variant_t::operator
unsigned int()
const
1656 if (V_VT(
this) == VT_UINT) {
1657 return V_UINT(
this);
1663 return V_UINT(&varDest);
1666 #if (_WIN32_WINNT >= 0x0501)
1669 inline _variant_t::operator __int64()
const
1671 if (V_VT(
this) == VT_I8) {
1678 return V_I8(&varDest);
1683 inline _variant_t::operator
unsigned __int64()
const
1685 if (V_VT(
this) == VT_UI8) {
1692 return V_UI8(&varDest);
1729 _com_util::CheckError(::VariantCopy(
this, const_cast<VARIANT*>(static_cast<const VARIANT*>(&varSrc))));
1739 if (V_VT(
this) == VT_I2) {
1742 else if (V_VT(
this) == VT_BOOL) {
1743 V_BOOL(
this) = (sSrc ? VARIANT_TRUE : VARIANT_FALSE);
1762 if (V_VT(
this) == VT_I4) {
1765 else if (V_VT(
this) == VT_ERROR) {
1766 V_ERROR(
this) = lSrc;
1768 else if (V_VT(
this) == VT_BOOL) {
1769 V_BOOL(
this) = (lSrc ? VARIANT_TRUE : VARIANT_FALSE);
1787 if (V_VT(
this) != VT_R4) {
1795 V_R4(
this) = fltSrc;
1805 if (V_VT(
this) == VT_R8) {
1806 V_R8(
this) = dblSrc;
1808 else if(V_VT(
this) == VT_DATE) {
1809 V_DATE(
this) = dblSrc;
1817 V_R8(
this) = dblSrc;
1827 if (V_VT(
this) != VT_CY) {
1844 _COM_ASSERT(V_VT(
this) != VT_BSTR || (BSTR) bstrSrc ==
NULL || V_BSTR(
this) != (BSTR) bstrSrc);
1850 V_VT(
this) = VT_BSTR;
1853 V_BSTR(
this) =
NULL;
1856 BSTR bstr =
static_cast<wchar_t*
>(bstrSrc);
1857 V_BSTR(
this) = ::SysAllocStringByteLen(reinterpret_cast<char*>(bstr),
1858 ::SysStringByteLen(bstr));
1860 if (V_BSTR(
this) ==
NULL) {
1872 _COM_ASSERT(V_VT(
this) != VT_BSTR || pSrc ==
NULL || V_BSTR(
this) != pSrc);
1878 V_VT(
this) = VT_BSTR;
1881 V_BSTR(
this) =
NULL;
1884 V_BSTR(
this) = ::SysAllocString(pSrc);
1886 if (V_BSTR(
this) ==
NULL) {
1898 _COM_ASSERT(V_VT(
this) != (VT_I1 | VT_BYREF) || pSrc ==
NULL || V_I1REF(
this) != pSrc);
1904 V_VT(
this) = VT_BSTR;
1914 _COM_ASSERT(V_VT(
this) != VT_DISPATCH || pSrc == 0 || V_DISPATCH(
this) != pSrc);
1920 V_VT(
this) = VT_DISPATCH;
1921 V_DISPATCH(
this) = pSrc;
1923 if (V_DISPATCH(
this) !=
NULL) {
1926 V_DISPATCH(
this)->AddRef();
1936 if (V_VT(
this) != VT_BOOL) {
1941 V_VT(
this) = VT_BOOL;
1944 V_BOOL(
this) = (boolSrc ? VARIANT_TRUE : VARIANT_FALSE);
1953 _COM_ASSERT(V_VT(
this) != VT_UNKNOWN || pSrc ==
NULL || V_UNKNOWN(
this) != pSrc);
1959 V_VT(
this) = VT_UNKNOWN;
1960 V_UNKNOWN(
this) = pSrc;
1962 if (V_UNKNOWN(
this) !=
NULL) {
1965 V_UNKNOWN(
this)->AddRef();
1975 if (V_VT(
this) != VT_DECIMAL) {
1982 V_DECIMAL(
this) = decSrc;
1983 V_VT(
this) = VT_DECIMAL;
1992 if (V_VT(
this) != VT_UI1) {
1997 V_VT(
this) = VT_UI1;
2009 if (V_VT(
this) != VT_I1) {
2026 if (V_VT(
this) != VT_UI2) {
2031 V_VT(
this) = VT_UI2;
2034 V_UI2(
this) = usSrc;
2043 if (V_VT(
this) != VT_UI4) {
2048 V_VT(
this) = VT_UI4;
2051 V_UI4(
this) = ulSrc;
2060 if (V_VT(
this) != VT_INT) {
2065 V_VT(
this) = VT_INT;
2077 if (V_VT(
this) != VT_UINT) {
2082 V_VT(
this) = VT_UINT;
2085 V_UINT(
this) = uiSrc;
2090 #if (_WIN32_WINNT >= 0x0501)
2095 if (V_VT(
this) != VT_I8) {
2112 if (V_VT(
this) != VT_UI8) {
2117 V_VT(
this) = VT_UI8;
2120 V_UI8(
this) = ui8Src;
2136 return *
this == &varSrc;
2139 #pragma warning(push)
2140 #pragma warning(disable: 4702) // unreachable code
2157 if (V_VT(
this) != V_VT(pSrc)) {
2164 switch (V_VT(
this)) {
2170 return V_I2(
this) == V_I2(pSrc);
2173 return V_I4(
this) == V_I4(pSrc);
2176 return V_R4(
this) == V_R4(pSrc);
2179 return V_R8(
this) == V_R8(pSrc);
2182 return memcmp(&(V_CY(
this)), &(V_CY(pSrc)),
sizeof(CY)) == 0;
2185 return V_DATE(
this) == V_DATE(pSrc);
2188 return (::SysStringByteLen(V_BSTR(
this)) == ::SysStringByteLen(V_BSTR(pSrc))) &&
2189 (
memcmp(V_BSTR(
this), V_BSTR(pSrc), ::SysStringByteLen(V_BSTR(
this))) == 0);
2192 return V_DISPATCH(
this) == V_DISPATCH(pSrc);
2195 return V_ERROR(
this) == V_ERROR(pSrc);
2198 return V_BOOL(
this) == V_BOOL(pSrc);
2201 return V_UNKNOWN(
this) == V_UNKNOWN(pSrc);
2204 return memcmp(&(V_DECIMAL(
this)), &(V_DECIMAL(pSrc)),
sizeof(DECIMAL)) == 0;
2207 return V_UI1(
this) == V_UI1(pSrc);
2210 return V_I1(
this) == V_I1(pSrc);
2213 return V_UI2(
this) == V_UI2(pSrc);
2216 return V_UI4(
this) == V_UI4(pSrc);
2219 return V_INT(
this) == V_INT(pSrc);
2222 return V_UINT(
this) == V_UINT(pSrc);
2224 #if (_WIN32_WINNT >= 0x0501)
2226 return V_I8(
this) == V_I8(pSrc);
2229 return V_UI8(
this) == V_UI8(pSrc);
2240 #pragma warning(pop)
2246 return !(*
this == &varSrc);
2253 return !(*
this == pSrc);
2279 _COM_MEMCPY_S(
this,
sizeof(varSrc), &varSrc,
sizeof(varSrc));
2280 V_VT(&varSrc) = VT_EMPTY;
2285 VARIANT varResult = *
this;
2286 V_VT(
this) = VT_EMPTY;
2293 return *(VARIANT*)
this;
2299 return (VARIANT*)
this;
2314 if ((
this != pSrc) || (vartype != V_VT(
this))) {
2316 const_cast<VARIANT*>(static_cast<const VARIANT*>(pSrc)),
2334 ::VariantClear(
this);
2348 if (V_VT(&var) == VT_BSTR) {
2349 *
this = V_BSTR(&var);
2356 *
this = V_BSTR(&varDest);
2363 if (V_VT(&var) == VT_BSTR) {
2364 *
this = V_BSTR(&var);
2371 *
this = V_BSTR(&varDest);
2379 #define bstr_t _bstr_t
2380 #define variant_t _variant_t
2383 #pragma pop_macro("new")
2385 #pragma warning(pop)
2387 #endif // _INC_COMUTIL
unsigned long RefCount() const
Definition: comutil.h:781
BSTR __stdcall ConvertStringToBSTR(const char *pSrc)
void _Free()
Definition: comutil.h:928
bool operator==(const VARIANT &varSrc) const
Definition: comutil.h:2134
Definition: comutil.h:144
void Clear()
Definition: comutil.h:2264
int _Compare(const _bstr_t &str) const
Definition: comutil.h:645
int Compare(const Data_t &str) const
Definition: comutil.h:876
void ChangeType(VARTYPE vartype, const _variant_t *pSrc=NULL)
Definition: comutil.h:2305
#define S_OK
Definition: comutil.h:62
void Assign(BSTR s)
Definition: comutil.h:848
unsigned long Release()
Definition: comutil.h:771
bool operator>=(const _bstr_t &str) const
Definition: comutil.h:532
bool operator!=(const _bstr_t &str) const
Definition: comutil.h:512
BSTR * GetAddress()
Definition: comutil.h:589
_variant_t & operator=(const VARIANT &varSrc)
Definition: comutil.h:1704
~Data_t()
Definition: comutil.h:921
BSTR Detach()
Definition: comutil.h:609
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
void Attach(BSTR s)
Definition: comutil.h:597
#define INTSAFE_UINT_MAX
Definition: comutil.h:68
void _Free()
Definition: comutil.h:635
_BidIt1 _Compare(_BidIt1 _Begin1, _BidIt1 _End1, _BidIt2 _Begin2, _BidIt2 _End2, const _RxTraits &_Traits, regex_constants::syntax_option_type _Sflags, bool _Partial)
Definition: regex:4229
void __declspec(noreturn) __stdcall _com_issue_error(HRESULT)
Cancels the currently executing task. This function can be called from within the body of a task to a...
Definition: ppltasks.h:203
Definition: comutil.h:1002
~_bstr_t()
Definition: comutil.h:341
VARIANT Detach()
Definition: comutil.h:2283
#define NULL
Definition: crtdbg.h:30
unsigned long AddRef()
Definition: comutil.h:765
Data_t * m_Data
Definition: comutil.h:277
unsigned long m_RefCount
Definition: comutil.h:257
_variant_t()
Definition: comutil.h:1128
BSTR copy(bool fCopy=true) const
Definition: comutil.h:545
unsigned int Length() const
Definition: comutil.h:869
char * m_str
Definition: comutil.h:256
_bstr_t & operator+=(const _bstr_t &s)
Definition: comutil.h:412
void __stdcall _com_issue_error(HRESULT)
BSTR & GetBSTR()
Definition: comutil.h:576
#define FAILED(hr)
Definition: comutil.h:71
const char * GetString() const
Definition: comutil.h:822
_bstr_t operator+(const char *s1, const _bstr_t &s2)
Definition: comutil.h:444
#define bool
Definition: stdbool.h:10
const wchar_t * GetWString() const
Definition: comutil.h:812
_bstr_t()
Definition: comutil.h:295
Definition: comutil.h:218
bool operator!() const
Definition: comutil.h:502
static HRESULT UIntAdd(UINT uAugend, UINT uAddend, UINT *puResult)
Definition: comutil.h:100
_bstr_t & operator=(const _bstr_t &s)
Definition: comutil.h:354
bool operator>(const _bstr_t &str) const
Definition: comutil.h:522
BSTR Copy() const
Definition: comutil.h:833
void SetString(const char *pSrc)
Definition: comutil.h:2321
VARIANT * GetAddress()
Definition: comutil.h:2296
#define _COM_MEMCPY_S(dest, destsize, src, count)
Definition: comutil.h:48
bool operator<(const _bstr_t &str) const
Definition: comutil.h:517
_bstr_t operator+(const _bstr_t &s) const
Definition: comutil.h:428
void Assign(BSTR s)
Definition: comutil.h:559
VARIANT & GetVARIANT()
Definition: comutil.h:2291
void Attach(BSTR s)
Definition: comutil.h:858
void _AddRef()
Definition: comutil.h:626
bool operator!=(const VARIANT &varSrc) const
Definition: comutil.h:2244
void Attach(VARIANT &varSrc)
Definition: comutil.h:2269
~_variant_t()
Definition: comutil.h:2332
#define _COM_ASSERT(x)
Definition: comutil.h:26
static HRESULT UIntMult(UINT uMultiplicand, UINT uMultiplier, UINT *puResult)
Definition: comutil.h:110
void CheckError(HRESULT hr)
Definition: comutil.h:94
BSTR m_wstr
Definition: comutil.h:255
bool operator==(const _bstr_t &str) const
Definition: comutil.h:507
bool operator<=(const _bstr_t &str) const
Definition: comutil.h:527
char *__stdcall ConvertBSTRToString(BSTR pSrc)
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
unsigned int length() const
Definition: comutil.h:552
#define INTSAFE_E_ARITHMETIC_OVERFLOW
Definition: comutil.h:65