Commit f97f5e13 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ntdll/tests: Use NtQueryInformationProcess() directly.

parent 0c7f4ad9
...@@ -63,7 +63,6 @@ static ULONG64 (WINAPI *pRtlGetExtendedFeaturesMask)(CONTEXT_EX *context_ex); ...@@ -63,7 +63,6 @@ static ULONG64 (WINAPI *pRtlGetExtendedFeaturesMask)(CONTEXT_EX *context_ex);
static NTSTATUS (WINAPI *pNtRaiseException)(EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance); static NTSTATUS (WINAPI *pNtRaiseException)(EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance);
static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*); static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*);
static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code); static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtQueryInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI *pNtQueryInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
...@@ -1534,7 +1533,7 @@ static void test_dpe_exceptions(void) ...@@ -1534,7 +1533,7 @@ static void test_dpe_exceptions(void)
ULONG len; ULONG len;
/* Query DEP with len too small */ /* Query DEP with len too small */
stat = pNtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val - 1, &len); stat = NtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val - 1, &len);
if(stat == STATUS_INVALID_INFO_CLASS) if(stat == STATUS_INVALID_INFO_CLASS)
{ {
skip("This software platform does not support DEP\n"); skip("This software platform does not support DEP\n");
...@@ -1543,7 +1542,7 @@ static void test_dpe_exceptions(void) ...@@ -1543,7 +1542,7 @@ static void test_dpe_exceptions(void)
ok(stat == STATUS_INFO_LENGTH_MISMATCH, "buffer too small: %08lx\n", stat); ok(stat == STATUS_INFO_LENGTH_MISMATCH, "buffer too small: %08lx\n", stat);
/* Query DEP */ /* Query DEP */
stat = pNtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len); stat = NtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len);
ok(stat == STATUS_SUCCESS, "querying DEP: status %08lx\n", stat); ok(stat == STATUS_SUCCESS, "querying DEP: status %08lx\n", stat);
if(stat == STATUS_SUCCESS) if(stat == STATUS_SUCCESS)
{ {
...@@ -3562,7 +3561,7 @@ static void test_dpe_exceptions(void) ...@@ -3562,7 +3561,7 @@ static void test_dpe_exceptions(void)
NTSTATUS status; NTSTATUS status;
void *handler; void *handler;
status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len ); status = NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len );
ok( status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, "got status %08lx\n", status ); ok( status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, "got status %08lx\n", status );
if (!status) if (!status)
{ {
...@@ -10625,7 +10624,6 @@ START_TEST(exception) ...@@ -10625,7 +10624,6 @@ START_TEST(exception)
X(RtlAddVectoredContinueHandler); X(RtlAddVectoredContinueHandler);
X(RtlRemoveVectoredContinueHandler); X(RtlRemoveVectoredContinueHandler);
X(RtlSetUnhandledExceptionFilter); X(RtlSetUnhandledExceptionFilter);
X(NtQueryInformationProcess);
X(NtQueryInformationThread); X(NtQueryInformationThread);
X(NtSetInformationProcess); X(NtSetInformationProcess);
X(NtSuspendProcess); X(NtSuspendProcess);
......
...@@ -138,7 +138,6 @@ static NTSTATUS (WINAPI * pNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, void ...@@ -138,7 +138,6 @@ static NTSTATUS (WINAPI * pNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, void
static NTSTATUS (WINAPI * pNtQueryValueKey)(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *); static NTSTATUS (WINAPI * pNtQueryValueKey)(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
static NTSTATUS (WINAPI * pNtSetValueKey)(HANDLE, const PUNICODE_STRING, ULONG, static NTSTATUS (WINAPI * pNtSetValueKey)(HANDLE, const PUNICODE_STRING, ULONG,
ULONG, const void*, ULONG ); ULONG, const void*, ULONG );
static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG);
static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(PUNICODE_STRING); static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(PUNICODE_STRING);
static LONG (WINAPI * pRtlCompareUnicodeString)(const PUNICODE_STRING,const PUNICODE_STRING,BOOLEAN); static LONG (WINAPI * pRtlCompareUnicodeString)(const PUNICODE_STRING,const PUNICODE_STRING,BOOLEAN);
static BOOLEAN (WINAPI * pRtlCreateUnicodeString)(PUNICODE_STRING, LPCWSTR); static BOOLEAN (WINAPI * pRtlCreateUnicodeString)(PUNICODE_STRING, LPCWSTR);
...@@ -191,7 +190,6 @@ static BOOL InitFunctionPtrs(void) ...@@ -191,7 +190,6 @@ static BOOL InitFunctionPtrs(void)
NTDLL_GET_PROC(NtQueryKey) NTDLL_GET_PROC(NtQueryKey)
NTDLL_GET_PROC(NtQueryObject) NTDLL_GET_PROC(NtQueryObject)
NTDLL_GET_PROC(NtQueryValueKey) NTDLL_GET_PROC(NtQueryValueKey)
NTDLL_GET_PROC(NtQueryInformationProcess)
NTDLL_GET_PROC(NtSetValueKey) NTDLL_GET_PROC(NtSetValueKey)
NTDLL_GET_PROC(NtOpenKey) NTDLL_GET_PROC(NtOpenKey)
NTDLL_GET_PROC(NtNotifyChangeKey) NTDLL_GET_PROC(NtNotifyChangeKey)
...@@ -1488,7 +1486,7 @@ static void test_redirection(void) ...@@ -1488,7 +1486,7 @@ static void test_redirection(void)
if (ptr_size != 64) if (ptr_size != 64)
{ {
ULONG is_wow64, len; ULONG is_wow64, len;
if (pNtQueryInformationProcess( GetCurrentProcess(), ProcessWow64Information, if (NtQueryInformationProcess( GetCurrentProcess(), ProcessWow64Information,
&is_wow64, sizeof(is_wow64), &len ) || &is_wow64, sizeof(is_wow64), &len ) ||
!is_wow64) !is_wow64)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment