CFileDialog's DoModal fills debug window

0
CStringW strFilter;
strFilter.LoadStringW(IDS_IMGFILEFILTER);
//Image Files (*.bmp;*.gif;*.jpg;*.png;*.tif)*.bmp;*.gif;*.jpg;*.png;*.tif|All Files (*.*)|*.*||

CFileDialog dlgFile(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT |
    OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST, strFilter, AfxGetMainWnd());
if (dlgFile.DoModal() != IDOK) return;

Using Windows 10, 64bit

Errors appear immediately after DoModal called, before any interaction with dialog.

Output window:

mincore\com\oleaut32\dispatch\ups.cpp(2125)\OLEAUT32.dll!00007FF9F66E2CA6: (caller: 00007FF9F66E2DCA) ReturnHr(1) tid(2cac) 8002801D Library not registered.
The thread 0x27b4 has exited with code 0 (0x0).
Exception thrown at 0x00007FF9F503A388 (KernelBase.dll) in ProgramName.exe: 0x000006BA: The RPC server is unavailable.
onecoreuap\shell\windows.storage\homefolder.cpp(506)\windows.storage.dll!00007FF9F48A2884: (caller: 00007FF9F47CB563) ReturnHr(1) tid(3b00) 80070490 Element not found.
onecoreuap\shell\windows.storage\regfldr.cpp(1242)\windows.storage.dll!00007FF9F489F30D: (caller: 00007FF9F47C83E8) ReturnHr(2) tid(3b00) 80070490 Element not found.
onecoreuap\shell\windows.storage\homefolder.cpp(506)\windows.storage.dll!00007FF9F48A2884: (caller: 00007FF9F47CB563) ReturnHr(3) tid(3b00) 80070490 Element not found.
onecoreuap\shell\windows.storage\regfldr.cpp(1242)\windows.storage.dll!00007FF9F489F30D: (caller: 00007FF9F47C83E8) ReturnHr(4) tid(3b00) 80070490 Element not found.
onecoreuap\shell\windows.storage\homefolder.cpp(506)\windows.storage.dll!00007FF9F48A2884: (caller: 00007FF9F47CB563) ReturnHr(5) tid(2cac) 80070490 Element not found.
onecoreuap\shell\windows.storage\regfldr.cpp(1242)\windows.storage.dll!00007FF9F489F30D: (caller: 00007FF9F47C83E8) ReturnHr(6) tid(2cac) 80070490 Element not found.
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(1) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(1) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {BBACC218-34EA-4666-9D7A-C78F2274A524}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(2) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(2) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {5AB7172C-9C11-405C-8DD5-AF20F3606282}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(3) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(3) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {A78ED123-AB77-406B-9962-2A5D9D2F7F30}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(4) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(4) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {F241C880-6982-4CE5-8CF7-7085BA96DA5A}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(5) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(5) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {A0396A93-DC06-4AEF-BEE9-95FFCCAEF20E}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(6) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(6) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {9AA2F32D-362A-42D9-9328-24A483E2CCC3}.] 
shell\shell32\ovrlaymn.cpp(676)\SHELL32.dll!00007FF9F6BA3824: (caller: 00007FF9F6BA3604) ReturnHr(7) tid(2f64) 80040154 Class not registered
shell\shell32\ovrlaymn.cpp(758)\SHELL32.dll!00007FF9F6BA3653: (caller: 00007FF9F6BA34DE) LogHr(7) tid(2f64) 80040154 Class not registered
Msg:[Creating icon overlay handler from 敒楧瑳祲 failed. The CLSID is {C5FF006E-2AE9-408C-B85B-2DFDD5449D9C}.] 

But, don't see any problems with program execuation.

Also tried bVistaStyle = FALSE and copied the file name buffer code as shown here https://docs.microsoft.com/en-us/cpp/mfc/reference/cfiledialog-class?view=vs-2017

Still a page full of error messages.

File sharing has been intentionally disabled. Possible reason for "The RPC server is unavailable"?

Have seen the "OLEAUT32.dll Library not registered" message before in the default frame work VS created for a win32 desktop application but, message there went away several updates ago. Never caused any problems.

Know nothing about "windows.storage" but seems to provide access to known folders like "Desktop", "Documents" and others. No problems accessing these folders.

My biggest concern is that those Chinese (or whatever foreign language that is) processes definitely look like there is some kind of corruption.

Creating my own file name buffer seems unecessary as it works perfectly without it and "GetStartPosition" and "GetNextPathName" are bypassed in microsoft's example. Has this been updated?

c++
winapi
mfc
asked on Stack Overflow Nov 11, 2018 by Tad • edited Nov 11, 2018 by Barmak Shemirani

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0