ReactOS  0.4.15-dev-3173-g40ee59d
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 
16  TOKEN_READ,
17  &TokenHandle);
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 
27  TOKEN_READ,
28  0,
29  &TokenHandle);
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 
39  TOKEN_READ,
41  &TokenHandle);
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 }
NTSTATUS NTAPI NtOpenProcessTokenEx(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN ULONG HandleAttributes, OUT PHANDLE TokenHandle)
Definition: security.c:366
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NtOpenProcessToken(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, OUT PHANDLE TokenHandle)
Definition: security.c:350
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:715
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3398
#define TOKEN_READ
Definition: setypes.h:916
#define ok(value,...)
Definition: atltest.h:57
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define STATUS_SUCCESS
Definition: shellext.h:65