2016-07-13 14 views
0

ich GetOpenFilename bin mit einigen Dateinamen mit einem SSDWie GetOpenFileName das Laden von DLLs zu stoppen

const int BUFFER_SIZE = 8192; 
char* filenames = new char[BUFFER_SIZE]; 
filenames[0] = 0; 

OPENFILENAME ofn; 
ZeroMemory(&ofn, sizeof(ofn)); 
ofn.lStructSize = sizeof(ofn); 
ofn.hwndOwner = ::GetActiveWindow(); 
ofn.lpstrFile = filenames; 
ofn.nMaxFile = BUFFER_SIZE; 
ofn.lpstrFilter = 
    "Quotes\0*.json\0" 
    "All\0*.*\0"; 
ofn.lpstrCustomFilter = NULL; 
ofn.nMaxCustFilter = 0; 
ofn.nFilterIndex = 1; 
ofn.lpstrFileTitle = NULL; 
ofn.nMaxFileTitle = 0; 
ofn.lpstrTitle = "Web File Import"; 
ofn.lpstrInitialDir = "T:\\WebPending"; 
ofn.Flags = OFN_ENABLESIZING | OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_ENABLEHOOK; 
ofn.lpstrDefExt = "json"; 
ofn.lpfnHook = DDWebImport::Hook; 
bool rv = ::GetOpenFileName(&ofn); 
// Check the error if you have copied this code to another dialog and it returns immediately without popping up a form 
DWORD err = CommDlgExtendedError(); 

Ich bin mit einem Core i7 zu bekommen und diese über 8 Sekunden nimmt nur die Dateien zu zeigen. Wann hatte ich einen Blick in den Debug-Ausgabefenster,

'xxx.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Program Files (x86)\Common Files\Microsoft Shared\Ink\tiptsf.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\edputil.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\policymanager.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp110_win.dll', Symbols loaded (source information stripped). 
shell\comdlg32\fileopensave.cpp(9456)\COMDLG32.dll!76290750: (caller: 76283458) ReturnHr[PreRelease](1) tid(1664) 80070490 Element not found. 
CallContext:[\PickerModalLoop\InitDialog\FileDialogInitEnterpriseData] 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\thumbcache.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\ntshrui.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\srvcli.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\cscapi.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\StructuredQuery.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\actxprxy.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\Windows.Storage.Search.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\DataExchange.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\dcomp.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\d3d11.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\dxgi.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\twinapi.appcore.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Program Files (x86)\Common Files\TortoiseOverlays\TortoiseOverlays.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGitStub32.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\TortoiseGit32.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp120.dll', Symbols loaded. 
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\gitdll32.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\libgit232_tgit.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcr120.dll', Symbols loaded. 
'xxx.exe': Loaded 'C:\Program Files\TortoiseGit\bin\zlib132_tgit.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\FileSyncShell.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\wininet.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\Telemetry.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Users\cup\AppData\Local\Microsoft\OneDrive\17.3.6302.0225_1\LoggingPlatform.dll', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\cabinet.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\mssprxy.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\root\Office16\GROOVEEX.DLL', Cannot find or open the PDB file. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msvcp140.dll', Symbols loaded. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\ucrtbase.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\vcruntime140.dll', Symbols loaded. 
'xxx.exe': Loaded 'C:\Windows\SysWOW64\msi.dll', Symbols loaded (source information stripped). 
'xxx.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\root\Office16\1033\GrooveIntlResource.dll', Binary was not built with debug information 

Wie ich vom Laden DLLs wie directx stoppen GetOpenFilename tun, git, Tortoisegit, Groove, Microsoft Onedrive. Bei so vielen von ihnen dauert das Laden von Zeitaltern und ist nicht notwendig, um nur eine Reihe von Dateinamen anzuzeigen.

+0

Sie können nicht steuern, welche DLLs die Shell entscheidet, die geladen werden muss, wenn die Funktion aufgerufen wird. Das Laden von DirectX, Git und den anderen hängt sehr wahrscheinlich mit Vorschaubildern zusammen, die der Dialog wahlweise anzeigen kann oder Icon-Overlays (besonders im Fall von Tortoise Git, wenn es etwas wie Tortoise SVN ist). –

+0

Für die Aufzeichnung, bin ich nicht derjenige, der Ihre Frage abgelehnt hat. Ich habe nur einen Kommentar hinterlassen. –

+0

Ist es möglich, nur die Dateinamen ohne Symbole anzuzeigen? Am Ende des Tages bin ich nur daran interessiert, eine Reihe von Dateien auszuwählen. Es muss keine Symbole anzeigen. – cup

Antwort