@@ -42,7 +42,16 @@ const WCHAR lightpackUnhookDllName[] = L"prismatik-unhook.dll";
4242const WCHAR lightpackHooksDllName32[] = L" prismatik-hooks32.dll" ;
4343const WCHAR lightpackOffsetFinderName[] = L" offsetfinder.exe" ;
4444#endif
45- static LPCWSTR pwstrExcludeProcesses[] = { L" skype.exe" , L" chrome.exe" , L" firefox.exe" , L" iexplore.exe" , L" qtcreator.exe" , L" devenv.exe" , L" thunderbird.exe" };
45+ static LPCWSTR pwstrExcludeProcesses[] = {
46+ // Windows
47+ L" dwm.exe" , L" ShellExperienceHost.exe" , L" ApplicationFrameHost.exe" , L" LockAppHost.exe" , L" explorer.exe" , L" SearchUI.exe"
48+ // Graphics Drivers
49+ L" igfxEM.exe" , L" igfxTray.exe" , L" nvxdsync.exe" , L" nvvsvc.exe" ,
50+ // Browsers
51+ L" chrome.exe" , L" firefox.exe" , L" iexplore.exe" ,
52+ // Apps
53+ L" skype.exe" , L" SkypeHost.exe" , L" qtcreator.exe" , L" devenv.exe" , L" thunderbird.exe" , L" Steam.exe"
54+ };
4655static LPCWSTR pwstrDxModules[] = { L" d3d9.dll" , L" dxgi.dll" };
4756static LPCWSTR pwstrDxgiModules[] = { L" dxgi.dll" };
4857static LPCWSTR pwstrHookModules[] = { L" prismatik-hooks.dll" , L" prismatik-hooks32.dll" };
@@ -133,10 +142,13 @@ QList<DWORD> * getProcessesIDs(QList<DWORD> * processes, LPCWSTR withModule[], U
133142 HMODULE hMods[1024 ];
134143 DWORD cbNeeded;
135144 DWORD cProcesses;
136- char debug_buf[255 ];
145+ char debug_buf_process[255 ];
146+ char debug_buf_module[255 ];
137147 WCHAR executableName[MAX_PATH];
138148 unsigned int i;
139149
150+ DEBUG_MID_LEVEL << Q_FUNC_INFO << " scanning" ;
151+
140152 // Get the list of process identifiers.
141153 processes->clear ();
142154
@@ -167,12 +179,12 @@ QList<DWORD> * getProcessesIDs(QList<DWORD> * processes, LPCWSTR withModule[], U
167179
168180 PathStripPathW (executableName);
169181
170- ::WideCharToMultiByte (CP_ACP, 0 , executableName, -1 , debug_buf , 255 , NULL , NULL );
171- DEBUG_MID_LEVEL << Q_FUNC_INFO << debug_buf ;
182+ ::WideCharToMultiByte (CP_ACP, 0 , executableName, -1 , debug_buf_process , 255 , NULL , NULL );
183+ DEBUG_HIGH_LEVEL << Q_FUNC_INFO << " evaluating process " << debug_buf_process ;
172184
173185 for (unsigned k = 0 ; k < SIZEOF_ARRAY (pwstrExcludeProcesses); k++) {
174186 if (wcsicmp (executableName, pwstrExcludeProcesses[k]) == 0 ) {
175- DEBUG_MID_LEVEL << Q_FUNC_INFO << " skipping " << pwstrExcludeProcesses[k] ;
187+ DEBUG_HIGH_LEVEL << Q_FUNC_INFO << " skipping" << debug_buf_process ;
176188 goto nextProcess;
177189 }
178190 }
@@ -194,8 +206,8 @@ QList<DWORD> * getProcessesIDs(QList<DWORD> * processes, LPCWSTR withModule[], U
194206 {
195207
196208 PathStripPathW (szModName);
197- ::WideCharToMultiByte (CP_ACP, 0 , szModName, -1 , debug_buf , 255 , NULL , NULL );
198- DEBUG_HIGH_LEVEL << Q_FUNC_INFO << debug_buf ;
209+ ::WideCharToMultiByte (CP_ACP, 0 , szModName, -1 , debug_buf_module , 255 , NULL , NULL );
210+ // DEBUG_HIGH_LEVEL << Q_FUNC_INFO << debug_buf_process << "has module" << debug_buf_module ;
199211
200212 for (unsigned k = 0 ; k < withoutModuleCount; k++) {
201213 if (wcsicmp (szModName, withoutModule[k]) == 0 ) {
@@ -220,11 +232,19 @@ QList<DWORD> * getProcessesIDs(QList<DWORD> * processes, LPCWSTR withModule[], U
220232 RECT rcWindow;
221233 GetWindowRect (wnd, &rcWindow);
222234 if ((w == (rcWindow.right - rcWindow.left )) &&
223- (h == (rcWindow.bottom - rcWindow.top )))
224- processes->append (aProcesses[i]);
235+ (h == (rcWindow.bottom - rcWindow.top ))) {
225236
237+ DEBUG_MID_LEVEL << Q_FUNC_INFO << debug_buf_process << " has required module and fullscreen window" ;
238+ processes->append (aProcesses[i]);
239+ } else {
240+ DEBUG_MID_LEVEL << Q_FUNC_INFO << debug_buf_process << " has required module and non-fullscreen window" ;
241+ }
242+ } else {
243+ DEBUG_MID_LEVEL << Q_FUNC_INFO << debug_buf_process << " has required module and no window" ;
226244 }
227- } else {
245+ }
246+ else {
247+ DEBUG_MID_LEVEL << Q_FUNC_INFO << debug_buf_process << " has required module" ;
228248 processes->append (aProcesses[i]);
229249 }
230250
@@ -241,11 +261,11 @@ QList<DWORD> * getProcessesIDs(QList<DWORD> * processes, LPCWSTR withModule[], U
241261}
242262
243263QList<DWORD> * getDxProcessesIDs (QList<DWORD> * processes, LPCWSTR wstrSystemRootPath) {
244- return getProcessesIDs (processes, pwstrDxModules, SIZEOF_ARRAY (pwstrDxModules), pwstrHookModules, SIZEOF_ARRAY (pwstrHookModules), wstrSystemRootPath, true );
264+ return getProcessesIDs (processes, pwstrDxModules, SIZEOF_ARRAY (pwstrDxModules), pwstrHookModules, SIZEOF_ARRAY (pwstrHookModules), wstrSystemRootPath, true );
245265}
246266
247267QList<DWORD> * getDxgiProcessesIDs (QList<DWORD> * processes, LPCWSTR wstrSystemRootPath) {
248- return getProcessesIDs (processes, pwstrDxgiModules, SIZEOF_ARRAY (pwstrDxgiModules), pwstrHookModules, SIZEOF_ARRAY (pwstrHookModules), wstrSystemRootPath, true );
268+ return getProcessesIDs (processes, pwstrDxgiModules, SIZEOF_ARRAY (pwstrDxgiModules), pwstrHookModules, SIZEOF_ARRAY (pwstrHookModules), wstrSystemRootPath, true );
249269}
250270
251271QList<DWORD> * getHookedProcessesIDs (QList<DWORD> * processes, LPCWSTR wstrSystemRootPath) {
0 commit comments