как узнать разрядность ОС
Здравствуйте. Хочу узнать разрядность операционной системы, на которой запущена обработка (32 или 64). В MSDN нашел функцию:
BOOL IsWow64Process(
HANDLE hProcess,
PBOOL Wow64Process);
Parameters
hProcess [in] Handle to a process. Wow64Process [out] Pointer to a value that is set to TRUE if the process is running under WOW64. Otherwise, the value is set to FALSE. Return Values
If the function succeeds, the return value is a nonzero value.
В WinApi написал функцию:
client static boolean isWin64()
{
DLL dll = new DLL('Kernel32');
DLLFunction func = new DLLFunction(dll, 'IsWow64Process');
boolean ret = false;
;
func.call(appl.handle(), ret);
return ret;
}
использую:
static void test(Args _args)
{
boolean ret;
;
ret = WinApi::isWin64();
print(ret);
pause;
}
Вылетает с ошибкой:
Ошибка времени выполнения. : Метод был вызван с неверным числом параметров.
Подскажите, в чем может быть дело.
|