IFileSaveDialog - The RPC server is unavailable

-1

I use interface IFileSaveDialog from MS COM C++. I used example, but with minor changes:

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow)
{
    HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED |
        COINIT_DISABLE_OLE1DDE);
    if (SUCCEEDED(hr))
    {
        IFileOpenDialog* pFileOpen;
        hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_ALL,
            IID_IFileOpenDialog, reinterpret_cast<void**>(&pFileOpen));
        if (SUCCEEDED(hr))
        {
            hr = pFileOpen->Show(NULL);
            pFileOpen->Release();
        }
        CoUninitialize();
    }
    return 0;
}

This is working, but debugger visual studio writed list errors:

Exception thrown at 0x00007FFBF6D29129 (KernelBase.dll) in test_filesavedialog.exe: 0x000006BA: The RPC server is unavailable.
shell\osshell\lmui\ntshrui\dll\shrengine.cpp(1487)\ntshrui.dll!00007FFBD8E394D0: (caller: 00007FFBD8E34ED1) ReturnHr(1) tid(13c0) 80004005 Unknown error
shell\osshell\lmui\ntshrui\dll\shrengine.cpp(1487)\ntshrui.dll!00007FFBD8E394D0: (caller: 00007FFBD8E34ED1) ReturnHr(2) tid(3f94) 80004005 Unknown error
onecoreuap\shell\ext\thumbnailcache\lib\thumbcacheobj.cpp(2076)\thumbcache.dll!00007FFBD7D631A6: (caller: 00007FFBD7D51E95) ReturnHr(1) tid(2920) 80070057 Parameter is incorrect.
onecoreuap\shell\ext\thumbnailcache\lib\thumbcacheobj.cpp(2076)\thumbcache.dll!00007FFBD7D631A6: (caller: 00007FFBD7D51E95) ReturnHr(2) tid(2920) 80070057 Parameter is incorrect.
onecoreuap\shell\ext\thumbnailcache\lib\thumbcacheobj.cpp(2076)\thumbcache.dll!00007FFBD7D631A6: (caller: 00007FFBD7D51E95) ReturnHr(3) tid(2920) 80070057 Parameter is incorrect.

How the fix this problem and why the problem occurs? Thanks.

c++
winapi
com
asked on Stack Overflow Jul 5, 2019 by Range • edited Jul 6, 2019 by Barmak Shemirani

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0