Changeset 150 for trunk


Ignore:
Timestamp:
Nov 23, 2012, 6:44:52 AM (11 years ago)
Author:
roman
Message:
 
Location:
trunk/DirectShowSpy
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/Configuration.h

    r149 r150  
    6464                CPath m_sPath;
    6565                CPath m_sUserPath;
    66 
    67                 static BOOL IsAdministrator()
    68                 {
    69                         bool bIsMember = FALSE;
    70                         return CAccessToken().CheckTokenMembership(Sids::Admins(), &bIsMember) && bIsMember;
    71                 }
    7266
    7367        public:
     
    129123                                                m_RegisterButton.SetElevationRequiredState(TRUE);
    130124                                                m_UnregisterButton.SetElevationRequiredState(TRUE);
     125                                                // NOTE: Even per-user registration needs elevation, since we are hooking COM classes
     126                                                m_UserRegisterButton.SetElevationRequiredState(TRUE);
     127                                                m_UserUnregisterButton.SetElevationRequiredState(TRUE);
    131128                                        }
    132129                                }
     
    204201                                CWaitCursor WaitCursor;
    205202                                const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1);
    206                                 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n \"%s\""), bSilent ? _T("/s") : _T(""), GetPath()));
     203                                // NOTE: Even per-user registration needs elevation, since we are hooking COM classes
     204                                const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n \"%s\""), bSilent ? _T("/s") : _T(""), GetPath()), TRUE);
    207205                                if(bSilent)
    208206                                        MessageBeep(nExitCode ? MB_ICONERROR : MB_OK);
     
    223221                                const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1);
    224222                                const CPath& sPath = m_sUserPath; //GetPath();
    225                                 const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), sPath));
     223                                // NOTE: Even per-user registration needs elevation, since we are hooking COM classes
     224                                const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), sPath), TRUE);
    226225                                if(bSilent)
    227226                                        MessageBeep(nExitCode ? MB_ICONERROR : MB_OK);
     
    274273                CPath m_sPath;
    275274                CPath m_sUserPath;
    276 
    277                 static BOOL IsAdministrator()
    278                 {
    279                         bool bIsMember = FALSE;
    280                         return CAccessToken().CheckTokenMembership(Sids::Admins(), &bIsMember) && bIsMember;
    281                 }
    282275
    283276        public:
     
    341334                                                m_RegisterButton.SetElevationRequiredState(TRUE);
    342335                                                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);
    346336                                        }
    347337                                }
     
    419409                                CWaitCursor WaitCursor;
    420410                                const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1);
    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);
     411                                const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath));
    423412                                if(bSilent)
    424413                                        MessageBeep(nExitCode ? MB_ICONERROR : MB_OK);
     
    438427                                CWaitCursor WaitCursor;
    439428                                const BOOL bSilent = !(GetKeyState(VK_SCROLL) & 1);
    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);
     429                                const DWORD nExitCode = ExecuteWait(AtlFormatString(_T("%s /i:user /n /u \"%s\""), bSilent ? _T("/s") : _T(""), m_PropertySheet.m_sPropPagePath));
    442430                                if(bSilent)
    443431                                        MessageBeep(nExitCode ? MB_ICONERROR : MB_OK);
     
    529517                return sPath;
    530518        }
     519        static BOOL IsAdministrator()
     520        {
     521                bool bIsMember = FALSE;
     522                return CAccessToken().CheckTokenMembership(Sids::Admins(), &bIsMember) && bIsMember;
     523        }
    531524        static HANDLE Execute(const CString& sParameters, BOOL bAsAdministrator = FALSE)
    532525        {
  • trunk/DirectShowSpy/DirectShowSpy.rc

    r149 r150  
    6262
    6363VS_VERSION_INFO VERSIONINFO
    64  FILEVERSION  1, 0, 0, 802
     64 FILEVERSION  1, 0, 0, 807
    6565 PRODUCTVERSION 1,0,0,1
    6666 FILEFLAGSMASK 0x3fL
     
    8181            VALUE "CompanyName", "Roman Ryltsov"
    8282            VALUE "FileDescription", "Alax.Info DirectShow Spy Module"
    83             VALUE "FileVersion",  "1, 0, 0, 802\0"
     83            VALUE "FileVersion",  "1, 0, 0, 807\0"
    8484            VALUE "InternalName", "DirectShowSpy.dll"
    8585            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011"
  • trunk/DirectShowSpy/DirectShowSpy_i.c

    r149 r150  
    77
    88 /* File created by MIDL compiler version 7.00.0500 */
    9 /* at Fri Nov 23 16:34:56 2012
     9/* at Fri Nov 23 16:43:33 2012
    1010 */
    1111/* Compiler settings for .\DirectShowSpy.idl:
  • trunk/DirectShowSpy/DirectShowSpy_i.h

    r149 r150  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Fri Nov 23 16:34:56 2012
     7/* at Fri Nov 23 16:43:33 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
  • trunk/DirectShowSpy/DirectShowSpy_p.c

    r149 r150  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Fri Nov 23 16:34:56 2012
     7/* at Fri Nov 23 16:43:33 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
Note: See TracChangeset for help on using the changeset viewer.