winstd::com_obj "QueryInterface" constructors added
This commit is contained in:
parent
e9abc0e7b6
commit
79b9ac4371
@ -64,6 +64,32 @@ namespace winstd
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Queries the object for another interface and creates new class with it
|
||||
///
|
||||
/// \sa [IUnknown::QueryInterface method](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682521.aspx)
|
||||
///
|
||||
template <class _Other>
|
||||
inline com_obj(_Out_ _Other **other)
|
||||
{
|
||||
assert(other);
|
||||
other->QueryInterface(__uuidof(T), (void**)&m_h);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Queries the object for another interface and creates new class with it
|
||||
///
|
||||
/// \sa [IUnknown::QueryInterface method](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682521.aspx)
|
||||
///
|
||||
template <class _Other>
|
||||
inline com_obj(_Out_ com_obj<_Other> &other)
|
||||
{
|
||||
assert(other);
|
||||
other->QueryInterface(__uuidof(T), (void**)&m_h);
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Releases object
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user