Fix COM initialization with MMDevApi
This commit is contained in:
parent
507d2f8afb
commit
569106acd3
@ -71,7 +71,9 @@ static void *MMDevApiLoad(void)
|
||||
if(!Enumerator)
|
||||
{
|
||||
void *mme = NULL;
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
if(FAILED(hr))
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, &mme);
|
||||
|
Loading…
Reference in New Issue
Block a user