Fix inconsistent use of boolean and HRESULT
This commit is contained in:
@@ -28,7 +28,7 @@ bool WXDLLIMPEXP_CORE Initialize();
|
||||
|
||||
void WXDLLIMPEXP_CORE Uninitialize();
|
||||
|
||||
bool WXDLLIMPEXP_CORE GetActivationFactory(const wxString& activatableClassId, REFIID iid, void ** factory);
|
||||
HRESULT WXDLLIMPEXP_CORE GetActivationFactory(const wxString& activatableClassId, REFIID iid, void ** factory);
|
||||
|
||||
// RAII class initializing WinRT in its ctor and undoing it in its dtor.
|
||||
class WXDLLIMPEXP_CORE Initializer
|
||||
|
@@ -215,19 +215,17 @@ void Uninitialize()
|
||||
RTCore::Get().RoUninitialize();
|
||||
}
|
||||
|
||||
bool GetActivationFactory(const wxString& activatableClassId, REFIID iid, void ** factory)
|
||||
HRESULT GetActivationFactory(const wxString& activatableClassId, REFIID iid, void ** factory)
|
||||
{
|
||||
if ( !RTCore::IsAvailable() )
|
||||
return false;
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
|
||||
HRESULT hr = RTCore::Get().RoGetActivationFactory(TempStringRef(activatableClassId), iid, factory);
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
wxLogDebug("RoGetActivationFactory failed %.8x", hr);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
return hr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user