diff --git a/_c_o_m_8h_source.html b/_c_o_m_8h_source.html
index a78900bd..da9928be 100644
--- a/_c_o_m_8h_source.html
+++ b/_c_o_m_8h_source.html
@@ -3,12 +3,14 @@
-
+
WinStd: include/WinStd/COM.h Source File
+
+
@@ -30,7 +32,7 @@
-
+
@@ -104,1100 +106,1098 @@ $(document).ready(function() { init_codefold(0); });
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
94 _In_opt_ LPUNKNOWN pUnkOuter,
-
95 _In_ DWORD dwClsContext)
-
-
-
-
-
-
-
-
107 template <
class _Other>
-
-
-
-
-
111 HRESULT hr = other->QueryInterface(__uuidof(T), (
void **)&
m_h );
-
-
-
-
-
-
121 template <
class _Other>
-
-
-
-
124 HRESULT hr = other->QueryInterface(__uuidof(T), (
void **)&
m_h );
-
-
-
-
-
-
-
-
143 template <
class _Other>
-
-
-
-
-
-
148 return m_h ->QueryInterface(__uuidof(_Other), (
void **)h);
-
-
-
-
156 template <
class _Other>
-
-
-
-
-
-
161 HRESULT hr =
m_h ->QueryInterface(__uuidof(_Other), (
void **)&_h);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
207 m_h = SysAllocString(src);
-
-
209 throw std::bad_alloc();
-
-
-
-
-
215 bstr (_In_reads_opt_(len) LPCOLESTR src, _In_ UINT len)
-
-
217 m_h = SysAllocStringLen(src, len);
-
-
219 throw std::bad_alloc();
-
-
-
-
225 template <
class _Traits,
class _Ax>
-
-
226 bstr (_In_
const std::basic_string<OLECHAR, _Traits, _Ax> &src)
-
-
228 size_t len = src.length();
-
-
230 throw std::invalid_argument(
"string too long" );
-
231 m_h = SysAllocStringLen(src.c_str(),
static_cast< UINT
> (len));
-
-
233 throw std::bad_alloc();
-
-
-
-
-
-
-
-
-
254 return SysStringLen(
m_h );
-
-
-
-
-
-
-
-
-
-
279 handle_type h_new = SysAllocStringLen(h, SysStringLen(h));
-
-
-
282 throw std::bad_alloc();
-
-
-
-
-
- 289 #pragma warning(push)
- 290 #pragma warning(disable: 26432)
-
-
-
-
-
-
-
-
-
-
-
308 const HRESULT hr = VariantCopy(
this , &varSrc);
-
-
-
-
-
-
316 #pragma warning(suppress: 26495)
-
-
-
-
319 memcpy(
this , &varSrc,
sizeof (VARIANT));
-
320 varSrc.vt = VT_EMPTY;
-
-
-
-
-
-
-
-
329 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
-
-
-
-
-
-
-
-
-
-
-
-
-
371 variant (_In_
int nSrc, _In_ VARTYPE vtSrc = VT_I4)
noexcept
-
-
373 assert(vtSrc == VT_I4 || vtSrc == VT_INT);
-
-
-
-
-
-
-
381 variant (_In_
unsigned int nSrc, _In_ VARTYPE vtSrc = VT_UI4)
noexcept
-
-
383 assert(vtSrc == VT_UI4 || vtSrc == VT_UINT);
-
-
-
-
-
-
-
391 variant (_In_
long nSrc, _In_ VARTYPE vtSrc = VT_I4)
noexcept
-
-
393 assert(vtSrc == VT_I4 || vtSrc == VT_ERROR);
-
-
-
-
-
-
-
-
-
-
-
419 variant (_In_
double dblSrc, _In_ VARTYPE vtSrc = VT_R8)
noexcept
-
-
421 assert(vtSrc == VT_R8 || vtSrc == VT_DATE);
-
-
-
-
-
-
-
-
-
438 variant (_In_
unsigned long long nSrc)
noexcept
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
480 if (pdispVal != NULL)
-
-
-
-
-
-
-
-
-
-
501 assert(pSrc != NULL);
-
-
-
504 const HRESULT hr = SafeArrayCopy(
const_cast< LPSAFEARRAY
> (pSrc), &pCopy);
-
-
-
-
508 SafeArrayGetVartype(
const_cast< LPSAFEARRAY
> (pSrc), &vt);
-
-
-
-
-
-
-
-
-
-
-
526 if (
this != &varSrc) {
-
527 const HRESULT hr = VariantCopy(
this , &varSrc);
-
-
-
-
-
-
-
-
-
-
-
539 if (
this != &varSrc) {
-
-
541 memcpy(
this , &varSrc,
sizeof (VARIANT));
-
542 varSrc.vt = VT_EMPTY;
-
-
-
-
-
-
-
-
-
-
-
-
-
556 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
738 bstrVal = SysAllocString(lpszSrc);
-
-
-
-
-
-
-
-
-
-
-
750 if (pdispVal != NULL)
-
-
-
-
-
-
-
-
-
-
-
773 if (vt != (VT_UI1|VT_BYREF)) {
-
-
775 vt = VT_UI1|VT_BYREF;
-
-
-
-
-
-
-
-
-
-
786 if (vt != (VT_I2|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
799 if (vt != (VT_UI2|VT_BYREF)) {
-
-
801 vt = VT_UI2|VT_BYREF;
-
-
-
-
-
-
-
-
-
-
812 if (vt != (VT_I4|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
825 if (vt != (VT_UI4|VT_BYREF)) {
-
-
827 vt = VT_UI4|VT_BYREF;
-
-
-
-
-
-
-
-
-
-
838 if (vt != (VT_I4|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
851 if (vt != (VT_UI4|VT_BYREF)) {
-
-
853 vt = VT_UI4|VT_BYREF;
-
-
-
-
-
-
-
-
-
-
864 if (vt != (VT_I8|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
877 if (vt != (VT_UI8|VT_BYREF)) {
-
-
879 vt = VT_UI8|VT_BYREF;
-
-
-
-
-
-
-
-
-
-
890 if (vt != (VT_R4|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
903 if (vt != (VT_R8|VT_BYREF)) {
-
-
-
-
-
-
-
-
-
-
-
-
916 assert(pSrc != NULL);
-
-
-
-
920 const HRESULT hr = SafeArrayCopy(
const_cast< LPSAFEARRAY
> (pSrc), &pCopy);
-
-
922 SafeArrayGetVartype(
const_cast< LPSAFEARRAY
> (pSrc), &vt);
-
-
-
-
-
-
-
-
-
-
-
-
-
941 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return true ;
-
942 if (vt != varSrc.vt)
return false ;
-
943 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0) ==
static_cast< HRESULT
> (VARCMP_EQ);
-
-
-
-
-
-
-
967 bool operator< (_In_
const VARIANT& varSrc)
const noexcept
-
-
969 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return false ;
-
970 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0)==
static_cast< HRESULT
> (VARCMP_LT);
-
-
-
-
-
981 bool operator> (_In_
const VARIANT& varSrc)
const noexcept
-
-
983 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return false ;
-
984 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0)==
static_cast< HRESULT
> (VARCMP_GT);
-
-
-
-
-
-
-
-
-
1018 HRESULT
change_type (_In_ VARTYPE _vt, _In_opt_ USHORT wFlags = 0) noexcept
-
-
1020 return VariantChangeType(
this ,
this , wFlags, _vt);
-
-
-
-
-
1025 HRESULT compare(_In_
const VARIANT &varLeft, _In_
const VARIANT &varRight, _In_ LCID lcid, _In_ ULONG dwFlags)
const noexcept
-
-
-
1028 case VT_I1:
return varLeft.cVal == varRight.cVal ? VARCMP_EQ : varLeft.cVal > varRight.cVal ? VARCMP_GT : VARCMP_LT;
-
1029 case VT_UI2:
return varLeft.uiVal == varRight.uiVal ? VARCMP_EQ : varLeft.uiVal > varRight.uiVal ? VARCMP_GT : VARCMP_LT;
-
1030 case VT_UI4:
return varLeft.uintVal == varRight.uintVal ? VARCMP_EQ : varLeft.uintVal > varRight.uintVal ? VARCMP_GT : VARCMP_LT;
-
1031 case VT_UI8:
return varLeft.ullVal == varRight.ullVal ? VARCMP_EQ : varLeft.ullVal > varRight.ullVal ? VARCMP_GT : VARCMP_LT;
-
1032 default :
return VarCmp(
const_cast< LPVARIANT
> (&varLeft),
const_cast< LPVARIANT
> (&varRight), lcid, dwFlags);
-
-
-
-
- 1037 #pragma warning(pop)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1066 SafeArrayDestroy(
m_h );
-
-
-
-
-
-
-
-
1081 HRESULT hr = SafeArrayCopy(h, &h_new);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1105 HRESULT hr = SafeArrayAccessData(psa, (
void HUGEP**)&
m_data );
-
-
-
-
-
-
-
-
-
1117 SafeArrayUnaccessData(
m_sa );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1149 HRESULT hr = CoInitialize(pvReserved);
-
-
-
-
-
-
-
-
-
1161 HRESULT hr = CoInitializeEx(pvReserved, dwCoInit);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1192 HRESULT hr =
CoCreateInstance (rclsid, pUnkOuter, dwClsContext, __uuidof(T), (LPVOID*)&ppv);
-
-
-
-
-
-
-
-
-
-
-
-
1207 HRESULT hr =
CoGetObject (pszName, pBindOptions, riid, (LPVOID*)&ppv);
-
-
-
-
-
-
-BSTR string wrapper.
Definition COM.h:198
-bstr(LPCOLESTR src)
Constructs BSTR from OLE string.
Definition COM.h:205
-handle_type duplicate_internal(handle_type h) const override
Duplicates the string.
Definition COM.h:277
-virtual ~bstr()
Destroys the string.
Definition COM.h:241
-void free_internal() noexcept override
Destroys the string.
Definition COM.h:263
-UINT length() const noexcept
Returns the length of the string.
Definition COM.h:252
-bstr(LPCOLESTR src, UINT len)
Constructs BSTR from OLE string with length.
Definition COM.h:215
-bstr(const std::basic_string< OLECHAR, _Traits, _Ax > &src)
Constructs BSTR from std::basic_string.
Definition COM.h:226
-Context scope automatic COM (un)initialization.
Definition COM.h:1137
-com_initializer(LPVOID pvReserved, DWORD dwCoInit)
Initializes the COM library for use by the calling thread, sets the thread's concurrency model,...
Definition COM.h:1159
-virtual ~com_initializer()
Uninitializes COM.
Definition COM.h:1171
-com_initializer(LPVOID pvReserved)
Initializes the COM library on the current thread and identifies the concurrency model as single-thre...
Definition COM.h:1147
-COM object wrapper template.
Definition COM.h:83
-void free_internal() noexcept override
Releases the object by decrementing reference counter.
Definition COM.h:173
-com_obj(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext)
Creates a new instance of a class.
Definition COM.h:92
-HRESULT query_interface(_Other **h) const
Queries the object for another interface.
Definition COM.h:144
-T * duplicate_internal(T *h) const override
Duplicates the object by incrementing the reference counter.
Definition COM.h:187
-HRESULT query_interface(com_obj< _Other > &h) const
Queries the object for another interface.
Definition COM.h:157
-virtual ~com_obj()
Releases object.
Definition COM.h:132
-com_obj(_Other *other)
Queries the object for another interface and creates new class with it.
Definition COM.h:108
-com_obj(com_obj< _Other > &other)
Queries the object for another interface and creates new class with it.
Definition COM.h:122
+
+
+
+
+
+
+
+
+
+
+
+
+
+
92 _In_opt_ LPUNKNOWN pUnkOuter,
+
93 _In_ DWORD dwClsContext)
+
+
+
+
+
+
+
+
105 template <
class _Other>
+
+
+
+
+
109 HRESULT hr = other->QueryInterface(__uuidof(T), (
void **)&
m_h );
+
+
+
+
+
+
119 template <
class _Other>
+
+
+
+
122 HRESULT hr = other->QueryInterface(__uuidof(T), (
void **)&
m_h );
+
+
+
+
+
+
+
+
141 template <
class _Other>
+
+
+
+
+
+
146 return m_h ->QueryInterface(__uuidof(_Other), (
void **)h);
+
+
+
+
154 template <
class _Other>
+
+
+
+
+
+
159 HRESULT hr =
m_h ->QueryInterface(__uuidof(_Other), (
void **)&_h);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
205 m_h = SysAllocString(src);
+
+
207 throw std::bad_alloc();
+
+
+
+
+
213 bstr (_In_reads_opt_(len) LPCOLESTR src, _In_ UINT len)
+
+
215 m_h = SysAllocStringLen(src, len);
+
+
217 throw std::bad_alloc();
+
+
+
+
223 template <
class _Traits,
class _Ax>
+
+
224 bstr (_In_
const std::basic_string<OLECHAR, _Traits, _Ax> &src)
+
+
226 size_t len = src.length();
+
+
228 throw std::invalid_argument(
"string too long" );
+
229 m_h = SysAllocStringLen(src.c_str(),
static_cast< UINT
> (len));
+
+
231 throw std::bad_alloc();
+
+
+
+
+
+
+
+
+
252 return SysStringLen(
m_h );
+
+
+
+
+
+
+
+
+
+
277 handle_type h_new = SysAllocStringLen(h, SysStringLen(h));
+
+
+
280 throw std::bad_alloc();
+
+
+
+
+
+ 287 #pragma warning(push)
+ 288 #pragma warning(disable: 26432)
+
+
+
+
+
+
+
+
+
+
+
306 const HRESULT hr = VariantCopy(
this , &varSrc);
+
+
+
+
+
+
314 #pragma warning(suppress: 26495)
+
+
+
+
317 memcpy(
this , &varSrc,
sizeof (VARIANT));
+
318 varSrc.vt = VT_EMPTY;
+
+
+
+
+
+
+
+
327 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
+
+
+
+
+
+
+
+
+
+
+
+
+
369 variant (_In_
int nSrc, _In_ VARTYPE vtSrc = VT_I4)
noexcept
+
+
371 assert(vtSrc == VT_I4 || vtSrc == VT_INT);
+
+
+
+
+
+
+
379 variant (_In_
unsigned int nSrc, _In_ VARTYPE vtSrc = VT_UI4)
noexcept
+
+
381 assert(vtSrc == VT_UI4 || vtSrc == VT_UINT);
+
+
+
+
+
+
+
389 variant (_In_
long nSrc, _In_ VARTYPE vtSrc = VT_I4)
noexcept
+
+
391 assert(vtSrc == VT_I4 || vtSrc == VT_ERROR);
+
+
+
+
+
+
+
+
+
+
+
417 variant (_In_
double dblSrc, _In_ VARTYPE vtSrc = VT_R8)
noexcept
+
+
419 assert(vtSrc == VT_R8 || vtSrc == VT_DATE);
+
+
+
+
+
+
+
+
+
436 variant (_In_
unsigned long long nSrc)
noexcept
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
478 if (pdispVal != NULL)
+
+
+
+
+
+
+
+
+
+
499 assert(pSrc != NULL);
+
+
+
502 const HRESULT hr = SafeArrayCopy(
const_cast< LPSAFEARRAY
> (pSrc), &pCopy);
+
+
+
+
506 SafeArrayGetVartype(
const_cast< LPSAFEARRAY
> (pSrc), &vt);
+
+
+
+
+
+
+
+
+
+
+
524 if (
this != &varSrc) {
+
525 const HRESULT hr = VariantCopy(
this , &varSrc);
+
+
+
+
+
+
+
+
+
+
+
537 if (
this != &varSrc) {
+
+
539 memcpy(
this , &varSrc,
sizeof (VARIANT));
+
540 varSrc.vt = VT_EMPTY;
+
+
+
+
+
+
+
+
+
+
+
+
+
554 boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
736 bstrVal = SysAllocString(lpszSrc);
+
+
+
+
+
+
+
+
+
+
+
748 if (pdispVal != NULL)
+
+
+
+
+
+
+
+
+
+
+
771 if (vt != (VT_UI1|VT_BYREF)) {
+
+
773 vt = VT_UI1|VT_BYREF;
+
+
+
+
+
+
+
+
+
+
784 if (vt != (VT_I2|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
797 if (vt != (VT_UI2|VT_BYREF)) {
+
+
799 vt = VT_UI2|VT_BYREF;
+
+
+
+
+
+
+
+
+
+
810 if (vt != (VT_I4|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
823 if (vt != (VT_UI4|VT_BYREF)) {
+
+
825 vt = VT_UI4|VT_BYREF;
+
+
+
+
+
+
+
+
+
+
836 if (vt != (VT_I4|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
849 if (vt != (VT_UI4|VT_BYREF)) {
+
+
851 vt = VT_UI4|VT_BYREF;
+
+
+
+
+
+
+
+
+
+
862 if (vt != (VT_I8|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
875 if (vt != (VT_UI8|VT_BYREF)) {
+
+
877 vt = VT_UI8|VT_BYREF;
+
+
+
+
+
+
+
+
+
+
888 if (vt != (VT_R4|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
901 if (vt != (VT_R8|VT_BYREF)) {
+
+
+
+
+
+
+
+
+
+
+
+
914 assert(pSrc != NULL);
+
+
+
+
918 const HRESULT hr = SafeArrayCopy(
const_cast< LPSAFEARRAY
> (pSrc), &pCopy);
+
+
920 SafeArrayGetVartype(
const_cast< LPSAFEARRAY
> (pSrc), &vt);
+
+
+
+
+
+
+
+
+
+
+
+
+
939 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return true ;
+
940 if (vt != varSrc.vt)
return false ;
+
941 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0) ==
static_cast< HRESULT
> (VARCMP_EQ);
+
+
+
+
+
+
+
965 bool operator< (_In_
const VARIANT& varSrc)
const noexcept
+
+
967 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return false ;
+
968 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0)==
static_cast< HRESULT
> (VARCMP_LT);
+
+
+
+
+
979 bool operator> (_In_
const VARIANT& varSrc)
const noexcept
+
+
981 if (vt == VT_NULL && varSrc.vt == VT_NULL)
return false ;
+
982 return compare(
static_cast< const VARIANT&
> (*
this ), varSrc, LOCALE_USER_DEFAULT, 0)==
static_cast< HRESULT
> (VARCMP_GT);
+
+
+
+
+
+
+
+
+
1016 HRESULT
change_type (_In_ VARTYPE _vt, _In_opt_ USHORT wFlags = 0) noexcept
+
+
1018 return VariantChangeType(
this ,
this , wFlags, _vt);
+
+
+
+
+
1023 HRESULT compare(_In_
const VARIANT &varLeft, _In_
const VARIANT &varRight, _In_ LCID lcid, _In_ ULONG dwFlags)
const noexcept
+
+
+
1026 case VT_I1:
return varLeft.cVal == varRight.cVal ? VARCMP_EQ : varLeft.cVal > varRight.cVal ? VARCMP_GT : VARCMP_LT;
+
1027 case VT_UI2:
return varLeft.uiVal == varRight.uiVal ? VARCMP_EQ : varLeft.uiVal > varRight.uiVal ? VARCMP_GT : VARCMP_LT;
+
1028 case VT_UI4:
return varLeft.uintVal == varRight.uintVal ? VARCMP_EQ : varLeft.uintVal > varRight.uintVal ? VARCMP_GT : VARCMP_LT;
+
1029 case VT_UI8:
return varLeft.ullVal == varRight.ullVal ? VARCMP_EQ : varLeft.ullVal > varRight.ullVal ? VARCMP_GT : VARCMP_LT;
+
1030 default :
return VarCmp(
const_cast< LPVARIANT
> (&varLeft),
const_cast< LPVARIANT
> (&varRight), lcid, dwFlags);
+
+
+
+
+ 1035 #pragma warning(pop)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1064 SafeArrayDestroy(
m_h );
+
+
+
+
+
+
+
+
1079 HRESULT hr = SafeArrayCopy(h, &h_new);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1103 HRESULT hr = SafeArrayAccessData(psa, (
void HUGEP**)&
m_data );
+
+
+
+
+
+
+
+
+
1115 SafeArrayUnaccessData(
m_sa );
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1147 HRESULT hr = CoInitialize(pvReserved);
+
+
+
+
+
+
+
+
+
1159 HRESULT hr = CoInitializeEx(pvReserved, dwCoInit);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1190 HRESULT hr =
CoCreateInstance (rclsid, pUnkOuter, dwClsContext, __uuidof(T), (LPVOID*)&ppv);
+
+
+
+
+
+
+
+
+
+
+
+
1205 HRESULT hr =
CoGetObject (pszName, pBindOptions, riid, (LPVOID*)&ppv);
+
+
+
+
+
+
+BSTR string wrapper.
Definition COM.h:196
+bstr(LPCOLESTR src)
Constructs BSTR from OLE string.
Definition COM.h:203
+handle_type duplicate_internal(handle_type h) const override
Duplicates the string.
Definition COM.h:275
+virtual ~bstr()
Destroys the string.
Definition COM.h:239
+void free_internal() noexcept override
Destroys the string.
Definition COM.h:261
+UINT length() const noexcept
Returns the length of the string.
Definition COM.h:250
+bstr(LPCOLESTR src, UINT len)
Constructs BSTR from OLE string with length.
Definition COM.h:213
+bstr(const std::basic_string< OLECHAR, _Traits, _Ax > &src)
Constructs BSTR from std::basic_string.
Definition COM.h:224
+Context scope automatic COM (un)initialization.
Definition COM.h:1135
+com_initializer(LPVOID pvReserved, DWORD dwCoInit)
Initializes the COM library for use by the calling thread, sets the thread's concurrency model,...
Definition COM.h:1157
+virtual ~com_initializer()
Uninitializes COM.
Definition COM.h:1169
+com_initializer(LPVOID pvReserved)
Initializes the COM library on the current thread and identifies the concurrency model as single-thre...
Definition COM.h:1145
+COM object wrapper template.
Definition COM.h:81
+void free_internal() noexcept override
Releases the object by decrementing reference counter.
Definition COM.h:171
+com_obj(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext)
Creates a new instance of a class.
Definition COM.h:90
+HRESULT query_interface(_Other **h) const
Queries the object for another interface.
Definition COM.h:142
+T * duplicate_internal(T *h) const override
Duplicates the object by incrementing the reference counter.
Definition COM.h:185
+HRESULT query_interface(com_obj< _Other > &h) const
Queries the object for another interface.
Definition COM.h:155
+virtual ~com_obj()
Releases object.
Definition COM.h:130
+com_obj(_Other *other)
Queries the object for another interface and creates new class with it.
Definition COM.h:106
+com_obj(com_obj< _Other > &other)
Queries the object for another interface and creates new class with it.
Definition COM.h:120
COM runtime error.
Definition COM.h:26
com_runtime_error(error_type num, const std::string &msg)
Constructs an exception.
Definition COM.h:34
-com_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition COM.h:44
-Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition Common.h:1285
+com_runtime_error(error_type num, const char *msg=nullptr)
Constructs an exception.
Definition COM.h:43
+Base abstract template class to support object handle keeping for objects that support trivial handle...
Definition Common.h:1283
T handle_type
Datatype of the object handle this template class handles.
Definition Common.h:1025
-handle_type m_h
Object handle.
Definition Common.h:1274
-Numerical runtime error.
Definition Common.h:1483
-HRESULT error_type
Error number type.
Definition Common.h:1485
-Context scope automatic SAFEARRAY (un)access.
Definition COM.h:1093
-safearray_accessor(SAFEARRAY *psa)
Increments the lock count of an array, and retrieves a pointer to the array data.
Definition COM.h:1103
-T HUGEP * data() const noexcept
Return SAFEARRAY data pointer.
Definition COM.h:1123
-SAFEARRAY * m_sa
SAFEARRAY.
Definition COM.h:1129
-virtual ~safearray_accessor()
Decrements the lock count of an array.
Definition COM.h:1115
-T HUGEP * m_data
SAFEARRAY data.
Definition COM.h:1130
-SAFEARRAY string wrapper.
Definition COM.h:1043
-virtual ~safearray()
Destroys the array.
Definition COM.h:1052
-handle_type duplicate_internal(handle_type h) const override
Duplicates the array.
Definition COM.h:1078
-void free_internal() noexcept override
Destroys the array.
Definition COM.h:1064
-VARIANT struct wrapper.
Definition COM.h:292
-bool operator<=(const VARIANT &varSrc) const noexcept
Is variant less than or equal to?
Definition COM.h:995
-variant(bool bSrc) noexcept
Constructs VARIANT from bool.
Definition COM.h:326
-variant & operator=(unsigned int nSrc) noexcept
Copy from unsigned int value.
Definition COM.h:628
-variant & operator=(unsigned long nSrc) noexcept
Copy from unsigned long value.
Definition COM.h:654
-variant(float fltSrc) noexcept
Constructs VARIANT from float.
Definition COM.h:410
-variant(VARIANT &&varSrc) noexcept
Moves VARIANT from another.
Definition COM.h:317
-variant & operator=(float fltSrc) noexcept
Copy from float value.
Definition COM.h:694
-variant & operator=(float *pfSrc) noexcept
Copy from float reference.
Definition COM.h:888
-variant(IDispatch *pSrc)
Constructs VARIANT from IDispatch.
Definition COM.h:475
-variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from integer.
Definition COM.h:371
-variant(const SAFEARRAY *pSrc)
Constructs VARIANT from SAFEARRAY.
Definition COM.h:499
-variant & operator=(double *pfSrc) noexcept
Copy from double reference.
Definition COM.h:901
-variant & operator=(const SAFEARRAY *pSrc)
Copy from SAFEARRAY.
Definition COM.h:914
-variant & operator=(int *pnSrc) noexcept
Copy from int reference.
Definition COM.h:810
-bool operator>(const VARIANT &varSrc) const noexcept
Is variant greater than?
Definition COM.h:981
-variant & operator=(bool bSrc) noexcept
Copy from bool value.
Definition COM.h:550
-variant & operator=(long nSrc) noexcept
Copy from long value.
Definition COM.h:641
-HRESULT change_type(VARTYPE _vt, USHORT wFlags=0) noexcept
Converts a variant from one type to another.
Definition COM.h:1018
-variant & operator=(IUnknown *pSrc)
Copy from IUnknown.
Definition COM.h:758
-variant & operator=(short nSrc) noexcept
Copy from short value.
Definition COM.h:589
-variant & operator=(unsigned char *pbSrc) noexcept
Copy from unsigned char reference.
Definition COM.h:771
-variant & operator=(unsigned short nSrc) noexcept
Copy from unsigned short value.
Definition COM.h:602
-variant & operator=(unsigned char nSrc) noexcept
Copy from unsigned char value.
Definition COM.h:576
-variant & operator=(char cSrc) noexcept
Copy from char value.
Definition COM.h:563
-variant(LPCOLESTR lpszSrc) noexcept
Constructs VARIANT from OLE string.
Definition COM.h:457
-virtual ~variant()
Destroys VARIANT.
Definition COM.h:516
-variant(const VARIANT &varSrc)
Constructs VARIANT from another.
Definition COM.h:305
-variant(unsigned char nSrc) noexcept
Constructs VARIANT from byte.
Definition COM.h:344
-variant & operator=(double dblSrc) noexcept
Copy from double value.
Definition COM.h:707
-bool operator!=(const VARIANT &varSrc) const noexcept
Is variant not equal to?
Definition COM.h:954
-variant & operator=(int nSrc) noexcept
Copy from int value.
Definition COM.h:615
-variant(unsigned long nSrc) noexcept
Constructs VARIANT from unsigned long.
Definition COM.h:401
-bool operator==(const VARIANT &varSrc) const noexcept
Is variant equal to?
Definition COM.h:939
-variant(IUnknown *pSrc)
Constructs VARIANT from IUnknown.
Definition COM.h:487
-variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept
Constructs VARIANT from unsigned integer.
Definition COM.h:381
-variant & operator=(CY cySrc) noexcept
Copy from CY value.
Definition COM.h:720
-variant & operator=(LPCOLESTR lpszSrc) noexcept
Copy from OLE string value.
Definition COM.h:734
-variant(long long nSrc) noexcept
Constructs VARIANT from 64-bit integer.
Definition COM.h:429
-variant & operator=(unsigned int *pnSrc) noexcept
Copy from unsigned int reference.
Definition COM.h:823
-variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from long.
Definition COM.h:391
-variant & operator=(long *pnSrc) noexcept
Copy from long reference.
Definition COM.h:836
-variant(unsigned short nSrc) noexcept
Constructs VARIANT from unsigned short.
Definition COM.h:362
-bool operator>=(const VARIANT &varSrc) const noexcept
Is variant greater than or equal to?
Definition COM.h:1008
-variant & operator=(short *pnSrc) noexcept
Copy from short reference.
Definition COM.h:784
-variant() noexcept
Constructs blank VARIANT.
Definition COM.h:297
-bool operator<(const VARIANT &varSrc) const noexcept
Is variant less than?
Definition COM.h:967
-variant(unsigned long long nSrc) noexcept
Constructs VARIANT from unsigned integer.
Definition COM.h:438
-variant(char cSrc) noexcept
Constructs VARIANT from character.
Definition COM.h:335
-variant & operator=(unsigned short *pnSrc) noexcept
Copy from unsigned short reference.
Definition COM.h:797
-variant & operator=(long long *pnSrc) noexcept
Copy from long long reference.
Definition COM.h:862
-variant(BSTR bstr) noexcept
Constructs VARIANT from BSTR.
Definition COM.h:466
-variant & operator=(unsigned long long *pnSrc) noexcept
Copy from unsigned long long reference.
Definition COM.h:875
-variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept
Constructs VARIANT from double or variant date.
Definition COM.h:419
-variant(short nSrc) noexcept
Constructs VARIANT from short.
Definition COM.h:353
-variant(CY cySrc) noexcept
Constructs VARIANT from CY (64-bit integer)
Definition COM.h:447
-variant & operator=(unsigned long long nSrc) noexcept
Copy from unsigned long long value.
Definition COM.h:680
-variant & operator=(VARIANT &&varSrc) noexcept
Moves from another VARIANT.
Definition COM.h:537
-variant & operator=(long long nSrc) noexcept
Copy from long long value.
Definition COM.h:667
-variant & operator=(IDispatch *pSrc)
Copy from IDispatch.
Definition COM.h:745
-variant & operator=(unsigned long *pnSrc) noexcept
Copy from unsigned long reference.
Definition COM.h:849
-variant & operator=(const VARIANT &varSrc)
Copy from another VARIANT.
Definition COM.h:524
-static _Check_return_ HRESULT CoGetObject(LPCWSTR pszName, BIND_OPTS *pBindOptions, REFIID riid, winstd::com_obj< T > &v)
Converts a display name into a moniker that identifies the object named, and then binds to the object...
Definition COM.h:1204
-static _Check_return_ HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
Creates and default-initializes a single object of the class associated with a specified CLSID.
Definition COM.h:1189
+handle_type m_h
Object handle.
Definition Common.h:1272
+Numerical runtime error.
Definition Common.h:1477
+HRESULT error_type
Error number type.
Definition Common.h:1479
+Context scope automatic SAFEARRAY (un)access.
Definition COM.h:1091
+safearray_accessor(SAFEARRAY *psa)
Increments the lock count of an array, and retrieves a pointer to the array data.
Definition COM.h:1101
+T HUGEP * data() const noexcept
Return SAFEARRAY data pointer.
Definition COM.h:1121
+SAFEARRAY * m_sa
SAFEARRAY.
Definition COM.h:1127
+virtual ~safearray_accessor()
Decrements the lock count of an array.
Definition COM.h:1113
+T HUGEP * m_data
SAFEARRAY data.
Definition COM.h:1128
+SAFEARRAY string wrapper.
Definition COM.h:1041
+virtual ~safearray()
Destroys the array.
Definition COM.h:1050
+handle_type duplicate_internal(handle_type h) const override
Duplicates the array.
Definition COM.h:1076
+void free_internal() noexcept override
Destroys the array.
Definition COM.h:1062
+VARIANT struct wrapper.
Definition COM.h:290
+bool operator<=(const VARIANT &varSrc) const noexcept
Is variant less than or equal to?
Definition COM.h:993
+variant(bool bSrc) noexcept
Constructs VARIANT from bool.
Definition COM.h:324
+variant & operator=(unsigned int nSrc) noexcept
Copy from unsigned int value.
Definition COM.h:626
+variant & operator=(unsigned long nSrc) noexcept
Copy from unsigned long value.
Definition COM.h:652
+variant(float fltSrc) noexcept
Constructs VARIANT from float.
Definition COM.h:408
+variant(VARIANT &&varSrc) noexcept
Moves VARIANT from another.
Definition COM.h:315
+variant & operator=(float fltSrc) noexcept
Copy from float value.
Definition COM.h:692
+variant & operator=(float *pfSrc) noexcept
Copy from float reference.
Definition COM.h:886
+variant(IDispatch *pSrc)
Constructs VARIANT from IDispatch.
Definition COM.h:473
+variant(int nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from integer.
Definition COM.h:369
+variant(const SAFEARRAY *pSrc)
Constructs VARIANT from SAFEARRAY.
Definition COM.h:497
+variant & operator=(double *pfSrc) noexcept
Copy from double reference.
Definition COM.h:899
+variant & operator=(const SAFEARRAY *pSrc)
Copy from SAFEARRAY.
Definition COM.h:912
+variant & operator=(int *pnSrc) noexcept
Copy from int reference.
Definition COM.h:808
+bool operator>(const VARIANT &varSrc) const noexcept
Is variant greater than?
Definition COM.h:979
+variant & operator=(bool bSrc) noexcept
Copy from bool value.
Definition COM.h:548
+variant & operator=(long nSrc) noexcept
Copy from long value.
Definition COM.h:639
+HRESULT change_type(VARTYPE _vt, USHORT wFlags=0) noexcept
Converts a variant from one type to another.
Definition COM.h:1016
+variant & operator=(IUnknown *pSrc)
Copy from IUnknown.
Definition COM.h:756
+variant & operator=(short nSrc) noexcept
Copy from short value.
Definition COM.h:587
+variant & operator=(unsigned char *pbSrc) noexcept
Copy from unsigned char reference.
Definition COM.h:769
+variant & operator=(unsigned short nSrc) noexcept
Copy from unsigned short value.
Definition COM.h:600
+variant & operator=(unsigned char nSrc) noexcept
Copy from unsigned char value.
Definition COM.h:574
+variant & operator=(char cSrc) noexcept
Copy from char value.
Definition COM.h:561
+variant(LPCOLESTR lpszSrc) noexcept
Constructs VARIANT from OLE string.
Definition COM.h:455
+virtual ~variant()
Destroys VARIANT.
Definition COM.h:514
+variant(const VARIANT &varSrc)
Constructs VARIANT from another.
Definition COM.h:303
+variant(unsigned char nSrc) noexcept
Constructs VARIANT from byte.
Definition COM.h:342
+variant & operator=(double dblSrc) noexcept
Copy from double value.
Definition COM.h:705
+bool operator!=(const VARIANT &varSrc) const noexcept
Is variant not equal to?
Definition COM.h:952
+variant & operator=(int nSrc) noexcept
Copy from int value.
Definition COM.h:613
+variant(unsigned long nSrc) noexcept
Constructs VARIANT from unsigned long.
Definition COM.h:399
+bool operator==(const VARIANT &varSrc) const noexcept
Is variant equal to?
Definition COM.h:937
+variant(IUnknown *pSrc)
Constructs VARIANT from IUnknown.
Definition COM.h:485
+variant(unsigned int nSrc, VARTYPE vtSrc=VT_UI4) noexcept
Constructs VARIANT from unsigned integer.
Definition COM.h:379
+variant & operator=(CY cySrc) noexcept
Copy from CY value.
Definition COM.h:718
+variant & operator=(LPCOLESTR lpszSrc) noexcept
Copy from OLE string value.
Definition COM.h:732
+variant(long long nSrc) noexcept
Constructs VARIANT from 64-bit integer.
Definition COM.h:427
+variant & operator=(unsigned int *pnSrc) noexcept
Copy from unsigned int reference.
Definition COM.h:821
+variant(long nSrc, VARTYPE vtSrc=VT_I4) noexcept
Constructs VARIANT from long.
Definition COM.h:389
+variant & operator=(long *pnSrc) noexcept
Copy from long reference.
Definition COM.h:834
+variant(unsigned short nSrc) noexcept
Constructs VARIANT from unsigned short.
Definition COM.h:360
+bool operator>=(const VARIANT &varSrc) const noexcept
Is variant greater than or equal to?
Definition COM.h:1006
+variant & operator=(short *pnSrc) noexcept
Copy from short reference.
Definition COM.h:782
+variant() noexcept
Constructs blank VARIANT.
Definition COM.h:295
+bool operator<(const VARIANT &varSrc) const noexcept
Is variant less than?
Definition COM.h:965
+variant(unsigned long long nSrc) noexcept
Constructs VARIANT from unsigned integer.
Definition COM.h:436
+variant(char cSrc) noexcept
Constructs VARIANT from character.
Definition COM.h:333
+variant & operator=(unsigned short *pnSrc) noexcept
Copy from unsigned short reference.
Definition COM.h:795
+variant & operator=(long long *pnSrc) noexcept
Copy from long long reference.
Definition COM.h:860
+variant(BSTR bstr) noexcept
Constructs VARIANT from BSTR.
Definition COM.h:464
+variant & operator=(unsigned long long *pnSrc) noexcept
Copy from unsigned long long reference.
Definition COM.h:873
+variant(double dblSrc, VARTYPE vtSrc=VT_R8) noexcept
Constructs VARIANT from double or variant date.
Definition COM.h:417
+variant(short nSrc) noexcept
Constructs VARIANT from short.
Definition COM.h:351
+variant(CY cySrc) noexcept
Constructs VARIANT from CY (64-bit integer)
Definition COM.h:445
+variant & operator=(unsigned long long nSrc) noexcept
Copy from unsigned long long value.
Definition COM.h:678
+variant & operator=(VARIANT &&varSrc) noexcept
Moves from another VARIANT.
Definition COM.h:535
+variant & operator=(long long nSrc) noexcept
Copy from long long value.
Definition COM.h:665
+variant & operator=(IDispatch *pSrc)
Copy from IDispatch.
Definition COM.h:743
+variant & operator=(unsigned long *pnSrc) noexcept
Copy from unsigned long reference.
Definition COM.h:847
+variant & operator=(const VARIANT &varSrc)
Copy from another VARIANT.
Definition COM.h:522
+static _Check_return_ HRESULT CoGetObject(LPCWSTR pszName, BIND_OPTS *pBindOptions, REFIID riid, winstd::com_obj< T > &v)
Converts a display name into a moniker that identifies the object named, and then binds to the object...
Definition COM.h:1202
+static _Check_return_ HRESULT CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
Creates and default-initializes a single object of the class associated with a specified CLSID.
Definition COM.h:1187
#define WINSTD_NONCOPYABLE(C)
Declares a class as non-copyable.
Definition Common.h:67
#define WINSTD_NONMOVABLE(C)
Declares a class as non-movable.
Definition Common.h:75
#define WINSTD_DPLHANDLE_IMPL(C, T, INVAL)
Implements default constructors and operators to prevent their auto-generation by compiler.
Definition Common.h:176
static const T invalid
Invalid handle value.
Definition Common.h:1030
-Deleter for unique_ptr using CoTaskMemFree.
Definition COM.h:58
-void operator()(_T *_Ptr) const
Delete a pointer.
Definition COM.h:70
-CoTaskMemFree_delete() noexcept
Default constructor.
Definition COM.h:62
+Deleter for unique_ptr using CoTaskMemFree.
Definition COM.h:56
+void operator()(_T *_Ptr) const
Delete a pointer.
Definition COM.h:68
+CoTaskMemFree_delete() noexcept
Default constructor.
Definition COM.h:60