ReactOS 0.4.16-dev-136-g52192f1
NtOpenProcessToken.c File Reference
#include "precomp.h"
Include dependency graph for NtOpenProcessToken.c:

Go to the source code of this file.

Functions

 START_TEST (NtOpenProcessToken)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtOpenProcessToken  )

Definition at line 10 of file NtOpenProcessToken.c.

11{
14
18 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
19 if (NT_SUCCESS(Status))
20 {
21 ok((LONG_PTR)TokenHandle > 0, "TokenHandle = %p\n", TokenHandle);
23 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
24 }
25
28 0,
30 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
31 if (NT_SUCCESS(Status))
32 {
33 ok((LONG_PTR)TokenHandle > 0, "TokenHandle = %p\n", TokenHandle);
35 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
36 }
37
42 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
43 if (NT_SUCCESS(Status))
44 {
45 ok((LONG_PTR)TokenHandle > 0, "TokenHandle = %p\n", TokenHandle);
47 ok(Status == STATUS_SUCCESS, "Status = %lx\n", Status);
48 }
49}
#define ok(value,...)
Definition: atltest.h:57
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:25
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:726
#define NtCurrentProcess()
Definition: nt_native.h:1657
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
NTSTATUS NTAPI NtOpenProcessToken(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, OUT PHANDLE TokenHandle)
Definition: security.c:350
NTSTATUS NTAPI NtOpenProcessTokenEx(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN ULONG HandleAttributes, OUT PHANDLE TokenHandle)
Definition: security.c:366
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TOKEN_READ
Definition: setypes.h:951