- Timestamp:
- Nov 23, 2012, 6:37:26 AM (11 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/Configuration.h
r147 r149 80 80 { 81 81 _A(_pAtlModule); 82 const CPath& sLocalPath = GetPath(); 82 83 #pragma region System 83 84 CPath sPath = FindTypeLibraryPath(HKEY_LOCAL_MACHINE); … … 87 88 m_PathEdit.GetWindow(GW_HWNDPREV).EnableWindow(!bPathEmpty); 88 89 m_PathEdit.EnableWindow(!bPathEmpty); 89 m_RegisterButton.EnableWindow(bPathEmpty );90 m_RegisterButton.EnableWindow(bPathEmpty || _tcsicmp(sPath, sLocalPath)); 90 91 m_UnregisterButton.EnableWindow(!bPathEmpty); 91 92 m_sPath = sPath; … … 98 99 m_UserPathEdit.GetWindow(GW_HWNDPREV).EnableWindow(!bUserPathEmpty); 99 100 m_UserPathEdit.EnableWindow(!bUserPathEmpty); 100 m_UserRegisterButton.EnableWindow(bUserPathEmpty );101 m_UserRegisterButton.EnableWindow(bUserPathEmpty || _tcsicmp(sUserPath, sLocalPath)); 101 102 m_UserUnregisterButton.EnableWindow(!bUserPathEmpty); 102 103 m_sUserPath = sUserPath; … … 169 170 if(bSilent) 170 171 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 172 CancelToClose(); 171 173 } 172 174 _ATLCATCH(Exception) … … 183 185 CWaitCursor WaitCursor; 184 186 const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1); 185 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /u \"%s\""), bSilent ? _T("/s") : _T(""), GetPath()), TRUE); 186 if(bSilent) 187 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 187 const CPath& sPath = m_sPath; //GetPath(); 188 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /u \"%s\""), bSilent ? _T("/s") : _T(""), sPath), TRUE); 189 if(bSilent) 190 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 191 CancelToClose(); 188 192 } 189 193 _ATLCATCH(Exception) … … 203 207 if(bSilent) 204 208 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 209 CancelToClose(); 205 210 } 206 211 _ATLCATCH(Exception) … … 217 222 CWaitCursor WaitCursor; 218 223 const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1); 219 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), GetPath())); 220 if(bSilent) 221 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 224 const CPath& sPath = m_sUserPath; //GetPath(); 225 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), sPath)); 226 if(bSilent) 227 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 228 CancelToClose(); 222 229 } 223 230 _ATLCATCH(Exception) … … 284 291 class __declspec(uuid("92A3A302-DA7C-4A1F-BA7E-1802BB5D2D02")) PSFactoryBuffer; 285 292 _A(_pAtlModule); 293 const CPath& sLocalPath = m_PropertySheet.m_sPropPagePath; 286 294 #pragma region System 287 //CPath s UserPath = FindTypeLibraryPath(HKEY_LOCAL_MACHINE);295 //CPath sPath = FindTypeLibraryPath(HKEY_LOCAL_MACHINE); 288 296 CPath sPath = FindClassPath(HKEY_LOCAL_MACHINE, __uuidof(PSFactoryBuffer)); 289 297 const BOOL bPathEmpty = _tcslen(sPath) == 0; … … 292 300 m_PathEdit.GetWindow(GW_HWNDPREV).EnableWindow(!bPathEmpty); 293 301 m_PathEdit.EnableWindow(!bPathEmpty); 294 m_RegisterButton.EnableWindow(bPathEmpty );302 m_RegisterButton.EnableWindow(bPathEmpty || _tcsicmp(sPath, sLocalPath)); 295 303 m_UnregisterButton.EnableWindow(!bPathEmpty); 296 304 m_sPath = sPath; … … 333 341 m_RegisterButton.SetElevationRequiredState(TRUE); 334 342 m_UnregisterButton.SetElevationRequiredState(TRUE); 343 // NOTE: Even per-user registration needs elevation, since we are hooking COM classes 344 m_UserRegisterButton.SetElevationRequiredState(TRUE); 345 m_UserUnregisterButton.SetElevationRequiredState(TRUE); 335 346 } 336 347 } … … 374 385 if(bSilent) 375 386 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 387 CancelToClose(); 376 388 } 377 389 _ATLCATCH(Exception) … … 392 404 if(bSilent) 393 405 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 406 CancelToClose(); 394 407 } 395 408 _ATLCATCH(Exception) … … 406 419 CWaitCursor WaitCursor; 407 420 const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1); 408 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath)); 409 if(bSilent) 410 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 421 // NOTE: Even per-user registration needs elevation, since we are hooking COM classes 422 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath), TRUE); 423 if(bSilent) 424 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 425 CancelToClose(); 411 426 } 412 427 _ATLCATCH(Exception) … … 423 438 CWaitCursor WaitCursor; 424 439 const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1); 425 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath)); 426 if(bSilent) 427 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 440 // NOTE: Even per-user registration needs elevation, since we are hooking COM classes 441 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath), TRUE); 442 if(bSilent) 443 MessageBeep(nExitCode ? MB_ICONERROR : MB_OK); 444 CancelToClose(); 428 445 } 429 446 _ATLCATCH(Exception) -
trunk/DirectShowSpy/DirectShowSpy.rc
r147 r149 62 62 63 63 VS_VERSION_INFO VERSIONINFO 64 FILEVERSION 1, 0, 0, 79664 FILEVERSION 1, 0, 0, 802 65 65 PRODUCTVERSION 1,0,0,1 66 66 FILEFLAGSMASK 0x3fL … … 81 81 VALUE "CompanyName", "Roman Ryltsov" 82 82 VALUE "FileDescription", "Alax.Info DirectShow Spy Module" 83 VALUE "FileVersion", "1, 0, 0, 796\0"83 VALUE "FileVersion", "1, 0, 0, 802\0" 84 84 VALUE "InternalName", "DirectShowSpy.dll" 85 85 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011" -
trunk/DirectShowSpy/DirectShowSpy_i.c
r147 r149 7 7 8 8 /* File created by MIDL compiler version 7.00.0500 */ 9 /* at Fri Nov 23 00:35:1020129 /* at Fri Nov 23 16:34:56 2012 10 10 */ 11 11 /* Compiler settings for .\DirectShowSpy.idl: -
trunk/DirectShowSpy/DirectShowSpy_i.h
r147 r149 5 5 6 6 /* File created by MIDL compiler version 7.00.0500 */ 7 /* at Fri Nov 23 00:35:1020127 /* at Fri Nov 23 16:34:56 2012 8 8 */ 9 9 /* Compiler settings for .\DirectShowSpy.idl: -
trunk/DirectShowSpy/DirectShowSpy_p.c
r147 r149 5 5 6 6 /* File created by MIDL compiler version 7.00.0500 */ 7 /* at Fri Nov 23 00:35:1020127 /* at Fri Nov 23 16:34:56 2012 8 8 */ 9 9 /* Compiler settings for .\DirectShowSpy.idl:
Note: See TracChangeset
for help on using the changeset viewer.