#include <msclr/com/ptr.h>
template<class _interface_type>
Object obj_rcw
Definition: ptr.h:296
template<class _interface_type>
void assign(_interface_type *p)
Definition: ptr.h:276
Object obj_rcw
Definition: ptr.h:296
template<class _interface_type>
void destroy()
Definition: ptr.h:264
bool valid()
Definition: ptr.h:270
template<class _interface_type>
280 obj_rcw = System::Runtime::InteropServices::Marshal::GetUniqueObjectForIUnknown(System::IntPtr(p));
Object obj_rcw
Definition: ptr.h:296
template<class _interface_type>
87 throw gcnew System::InvalidOperationException(
"COM::ptr.Attach");
void assign(_interface_type *p)
Definition: ptr.h:276
bool valid()
Definition: ptr.h:270
template<class _interface_type>
void msclr::com::ptr< _interface_type >::CreateInstance |
( |
System::String^ |
prog_id, |
|
|
LPUNKNOWN |
pouter, |
|
|
DWORD |
cls_context |
|
) |
| |
|
inline |
104 wchar_t * pwszprog_id =
NULL;
106 if(prog_id !=
nullptr)
109 pwszprog_id = _wcsdup(_pinned_ptr);
#define NULL
Definition: vcruntime.h:236
__const_Char_ptr PtrToStringChars(__const_String_handle s)
Definition: vcclr.h:40
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
void msclr::com::ptr< _interface_type >::CreateInstance |
( |
System::String^ |
prog_id, |
|
|
LPUNKNOWN |
pouter |
|
) |
| |
|
inline |
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
#define NULL
Definition: vcruntime.h:236
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
135 System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(
136 CLSIDFromProgID(progid, &clsid));
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
#define NULL
Definition: vcruntime.h:236
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
154 throw gcnew System::InvalidOperationException(
"COM::ptr.CreateInstance");
157 _interface_type * interface_ptr =
NULL;
159 System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(CoCreateInstance(
160 rclsid, pouter, cls_context, __uuidof(_interface_type),
161 (
void**)&interface_ptr));
166 interface_ptr->Release();
#define NULL
Definition: vcruntime.h:236
void assign(_interface_type *p)
Definition: ptr.h:276
bool valid()
Definition: ptr.h:270
template<class _interface_type>
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
#define NULL
Definition: vcruntime.h:236
void CreateInstance(System::String^prog_id, LPUNKNOWN pouter, DWORD cls_context)
Definition: ptr.h:102
template<class _interface_type>
266 System::Runtime::InteropServices::Marshal::ReleaseComObject(
obj_rcw);
Object obj_rcw
Definition: ptr.h:296
template<class _interface_type>
188 return interface_ptr;
#define NULL
Definition: vcruntime.h:236
void destroy()
Definition: ptr.h:264
_interface_type * GetInterface()
Definition: ptr.h:213
bool valid()
Definition: ptr.h:270
template<class _interface_type>
220 System::IntPtr iface_intptr = System::Runtime::InteropServices::Marshal::GetIUnknownForObject(
obj_rcw);
222 IUnknown * iunk =
static_cast<IUnknown *
>(
static_cast<void*
>(iface_intptr));
224 _interface_type * interface_ptr =
NULL;
225 System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(iunk->QueryInterface(__uuidof(_interface_type), (
void **)&interface_ptr));
229 interface_ptr->AddRef();
230 System::Runtime::InteropServices::Marshal::Release(iface_intptr);
232 return interface_ptr;
#define NULL
Definition: vcruntime.h:236
Object obj_rcw
Definition: ptr.h:296
bool valid()
Definition: ptr.h:270
template<class _interface_type>
static _safe_bool const _safe_false
Definition: safebool.h:39
static _safe_bool const _safe_true
Definition: safebool.h:38
bool valid()
Definition: ptr.h:270
template<class _interface_type>
bool valid()
Definition: ptr.h:270
template<class _interface_type>
208 _detail::smart_com_ptr<_interface_type> interface_ptr(
GetInterface());
209 return interface_ptr;
_interface_type * GetInterface()
Definition: ptr.h:213
template<class _interface_type>
ptr<_interface_type> msclr::com::ptr< _interface_type >::operator= |
( |
_interface_type * |
_right | ) |
|
|
inline |
void Attach(_interface_type *_right)
Definition: ptr.h:83
template<class _interface_type>
template<class _other_type >
239 QueryInterface<_other_type>(__uuidof(_other_type), other);
template<class _interface_type>
template<class _other_type >
287 _detail::smart_com_ptr<_interface_type> interface_ptr(
GetInterface());
288 _other_type * other_ptr =
NULL;
290 System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(interface_ptr->QueryInterface(riid,(
void **)&other_ptr));
291 other.Attach(other_ptr);
293 other_ptr->Release();
#define NULL
Definition: vcruntime.h:236
_interface_type * GetInterface()
Definition: ptr.h:213
template<class _interface_type>
void destroy()
Definition: ptr.h:264
bool valid()
Definition: ptr.h:270
template<class _interface_type>
Object obj_rcw
Definition: ptr.h:296
template<class _interface_type>
The documentation for this class was generated from the following file:
- VS2015/inc/msclr/com/ptr.h