mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Fix for mingw. Assertion to catch use of win32 COM on an uninitialised thread.
This commit is contained in:
parent
e543949bda
commit
e184bec3d3
1 changed files with 4 additions and 2 deletions
|
|
@ -63,7 +63,9 @@ public:
|
|||
|
||||
HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
|
||||
{
|
||||
return ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress());
|
||||
HRESULT hr = ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress());
|
||||
jassert (hr != CO_E_NOTINITIALIZED); // You haven't called CoInitialize for the current thread!
|
||||
return hr;
|
||||
}
|
||||
|
||||
template <class OtherComClass>
|
||||
|
|
@ -134,7 +136,7 @@ public:
|
|||
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
|
||||
{
|
||||
if (refId == __uuidof (ComClass))
|
||||
return castToType <ComClass> (result);
|
||||
return this->castToType <ComClass> (result);
|
||||
|
||||
return ComBaseClassHelperBase <ComClass>::QueryInterface (refId, result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue