mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-25 12:14:33 -04:00
[misc] more DLL handling improvements
* also set rufus-next to 1.4.8
This commit is contained in:
parent
266599e6fd
commit
7a3fb515ea
10 changed files with 111 additions and 173 deletions
|
@ -35,13 +35,12 @@ char WindowsVersionStr[128] = "Windows ";
|
|||
BOOL is_x64(void)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
BOOL (__stdcall *pIsWow64Process)(HANDLE, PBOOL) = NULL;
|
||||
PF_TYPE_DECL(__stdcall, BOOL, IsWow64Process, (HANDLE, PBOOL));
|
||||
// Detect if we're running a 32 or 64 bit system
|
||||
if (sizeof(uintptr_t) < 8) {
|
||||
pIsWow64Process = (BOOL (__stdcall *)(HANDLE, PBOOL))
|
||||
GetProcAddress(GetDLLHandle("KERNEL32"), "IsWow64Process");
|
||||
if (pIsWow64Process != NULL) {
|
||||
(*pIsWow64Process)(GetCurrentProcess(), &ret);
|
||||
PF_INIT(IsWow64Process, Kernel32);
|
||||
if (pfIsWow64Process != NULL) {
|
||||
(*pfIsWow64Process)(GetCurrentProcess(), &ret);
|
||||
}
|
||||
} else {
|
||||
ret = TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue