mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[process] remove Vista-specific code
This commit is contained in:
parent
4c5adf092e
commit
f1f6e4b4ea
2 changed files with 9 additions and 13 deletions
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Modified from Process Hacker:
|
* Modified from Process Hacker:
|
||||||
* https://github.com/processhacker2/processhacker2/
|
* https://github.com/processhacker2/processhacker2/
|
||||||
* Copyright © 2017-2019 Pete Batard <pete@akeo.ie>
|
* Copyright © 2017-2020 Pete Batard <pete@akeo.ie>
|
||||||
* Copyright © 2017 dmex
|
* Copyright © 2017 dmex
|
||||||
* Copyright © 2009-2016 wj32
|
* Copyright © 2009-2016 wj32
|
||||||
*
|
*
|
||||||
|
@ -52,9 +52,6 @@ PF_TYPE_DECL(NTAPI, NTSTATUS, NtOpenProcessToken, (HANDLE, ACCESS_MASK, PHANDLE)
|
||||||
PF_TYPE_DECL(NTAPI, NTSTATUS, NtAdjustPrivilegesToken, (HANDLE, BOOLEAN, PTOKEN_PRIVILEGES, ULONG, PTOKEN_PRIVILEGES, PULONG));
|
PF_TYPE_DECL(NTAPI, NTSTATUS, NtAdjustPrivilegesToken, (HANDLE, BOOLEAN, PTOKEN_PRIVILEGES, ULONG, PTOKEN_PRIVILEGES, PULONG));
|
||||||
PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE));
|
PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE));
|
||||||
|
|
||||||
// This one is only available on Vista or later...
|
|
||||||
PF_TYPE_DECL(WINAPI, BOOL, QueryFullProcessImageNameW, (HANDLE, DWORD, LPWSTR, PDWORD));
|
|
||||||
|
|
||||||
static PVOID PhHeapHandle = NULL;
|
static PVOID PhHeapHandle = NULL;
|
||||||
static wchar_t* _wHandleName;
|
static wchar_t* _wHandleName;
|
||||||
static BOOL _bPartialMatch, _bIgnoreSelf, _bQuiet;
|
static BOOL _bPartialMatch, _bIgnoreSelf, _bQuiet;
|
||||||
|
@ -598,6 +595,7 @@ static DWORD WINAPI SearchProcessThread(LPVOID param)
|
||||||
|
|
||||||
// Where possible, try to get the full command line
|
// Where possible, try to get the full command line
|
||||||
bGotCmdLine = FALSE;
|
bGotCmdLine = FALSE;
|
||||||
|
size = MAX_PATH;
|
||||||
wcmdline = GetProcessCommandLine(processHandle);
|
wcmdline = GetProcessCommandLine(processHandle);
|
||||||
if (wcmdline != NULL) {
|
if (wcmdline != NULL) {
|
||||||
bGotCmdLine = TRUE;
|
bGotCmdLine = TRUE;
|
||||||
|
@ -611,10 +609,8 @@ static DWORD WINAPI SearchProcessThread(LPVOID param)
|
||||||
|
|
||||||
// The above may not work on Windows 7, so try QueryFullProcessImageName (Vista or later)
|
// The above may not work on Windows 7, so try QueryFullProcessImageName (Vista or later)
|
||||||
if (!bGotCmdLine) {
|
if (!bGotCmdLine) {
|
||||||
size = MAX_PATH;
|
bGotCmdLine = QueryFullProcessImageNameW(processHandle, 0, wexe_path, &size);
|
||||||
PF_INIT(QueryFullProcessImageNameW, kernel32);
|
if (bGotCmdLine)
|
||||||
if ( (pfQueryFullProcessImageNameW != NULL) &&
|
|
||||||
(bGotCmdLine = pfQueryFullProcessImageNameW(processHandle, 0, wexe_path, &size)) )
|
|
||||||
wchar_to_utf8_no_alloc(wexe_path, cmdline, sizeof(cmdline));
|
wchar_to_utf8_no_alloc(wexe_path, cmdline, sizeof(cmdline));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 3.9.1610"
|
CAPTION "Rufus 3.9.1611"
|
||||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||||
|
@ -394,8 +394,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,9,1610,0
|
FILEVERSION 3,9,1611,0
|
||||||
PRODUCTVERSION 3,9,1610,0
|
PRODUCTVERSION 3,9,1611,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -413,13 +413,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://rufus.ie"
|
VALUE "Comments", "https://rufus.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.9.1610"
|
VALUE "FileVersion", "3.9.1611"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.9.exe"
|
VALUE "OriginalFilename", "rufus-3.9.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.9.1610"
|
VALUE "ProductVersion", "3.9.1611"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue