Attempt to fix Qt file dialog issue in Windows
This commit is contained in:
parent
ea1a754e7d
commit
944c05814a
3 changed files with 4 additions and 4 deletions
|
|
@ -83,7 +83,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
|
|||
if(result == CO_E_NOTINITIALIZED)
|
||||
{
|
||||
weInitialised = true;
|
||||
CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL, IID_IShellLinkW, (void**)&shellLink);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ static bool OpenNotebook()
|
|||
|
||||
bool AsWMI_Open()
|
||||
{
|
||||
HRESULT init = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
HRESULT init = CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
if ( init < 0 && init != -2147417850 )
|
||||
return 0;
|
||||
coInitialized = 1;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ HRESULT Wmi::init()
|
|||
}
|
||||
|
||||
// Initialize COM. ------------------------------------------
|
||||
hres = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
hres = CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
return hres;
|
||||
|
|
@ -149,7 +149,7 @@ HRESULT Wmi::query(std::string queryStr, std::vector<QueryObj>& queryVectorOut,
|
|||
IEnumWbemClassObject* pEnumerator = nullptr;
|
||||
|
||||
// Initialize COM. ------------------------------------------
|
||||
hres = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
hres = CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
if (FAILED(hres))
|
||||
{
|
||||
return hres;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue