ReactOS  0.4.15-dev-1397-g19779b3
GetUserObjectInformation.c File Reference
#include "precomp.h"
#include <apitest_guard.h>
#include <ndk/mmfuncs.h>
#include <ndk/pstypes.h>
#include <strsafe.h>
Include dependency graph for GetUserObjectInformation.c:

Go to the source code of this file.

Macros

#define xok   ok
 
#define NOTSET   1234
 
#define TestUserObjectInfo(Handle, Index, Buffer, Length, Ret, Error, LengthNeeded)
 
#define TestUserObjectInfoWithString(Handle, Index, Buffer, BufferSize, String)
 
#define TestUserObjectInfo(Handle, Index, Buffer, Length, Ret, Error, LengthNeeded)
 
#define TestUserObjectInfoWithString(Handle, Index, Buffer, BufferSize, String)
 

Functions

static BOOLEAN CheckBuffer (PVOID Buffer, SIZE_T Size, UCHAR Value)
 
static void TestGetUserObjectInfoW (void)
 
static void TestGetUserObjectInfoA (void)
 
 START_TEST (GetUserObjectInformation)
 

Macro Definition Documentation

◆ NOTSET

#define NOTSET   1234

Definition at line 36 of file GetUserObjectInformation.c.

◆ TestUserObjectInfo [1/2]

#define TestUserObjectInfo (   Handle,
  Index,
  Buffer,
  Length,
  Ret,
  Error,
  LengthNeeded 
)

Definition at line 282 of file GetUserObjectInformation.c.

◆ TestUserObjectInfo [2/2]

#define TestUserObjectInfo (   Handle,
  Index,
  Buffer,
  Length,
  Ret,
  Error,
  LengthNeeded 
)

Definition at line 282 of file GetUserObjectInformation.c.

◆ TestUserObjectInfoWithString [1/2]

#define TestUserObjectInfoWithString (   Handle,
  Index,
  Buffer,
  BufferSize,
  String 
)
Value:
do \
{ \
BOOLEAN _Check; \
SIZE_T SizeOfString = wcslen(String) * sizeof(WCHAR) + sizeof(UNICODE_NULL); \
TestUserObjectInfo(Handle, Index, NULL, 0, FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
TestUserObjectInfo(Handle, Index, UlongToPtr(1), 0, FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
TestUserObjectInfo(Handle, Index, NULL, 1, FALSE, ERROR_NOACCESS, NOTSET); \
TestUserObjectInfo(Handle, Index, UlongToPtr(1), 1, FALSE, ERROR_NOACCESS, NOTSET); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, SizeOfString - 2, FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
_Check = CheckBuffer(Buffer, BufferSize, 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, SizeOfString - 1, FALSE, ERROR_INSUFFICIENT_BUFFER, SizeOfString); \
_Check = CheckBuffer(Buffer, BufferSize, 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
Buffer[BufferSize / sizeof(WCHAR) - 1] = UNICODE_NULL; \
TestUserObjectInfo(Handle, Index, Buffer, SizeOfString, TRUE, 0xdeadbeef, SizeOfString); \
ok(wcscmp(Buffer, String) == 0, "Buffer '%ls', expected '%ls'\n", Buffer, String); \
_Check = CheckBuffer(Buffer + SizeOfString / sizeof(Buffer[0]), BufferSize - SizeOfString - sizeof(WCHAR), 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
Buffer[BufferSize / sizeof(WCHAR) - 1] = UNICODE_NULL; \
TestUserObjectInfo(Handle, Index, Buffer, BufferSize, TRUE, 0xdeadbeef, SizeOfString); \
ok(wcscmp(Buffer, String) == 0, "Buffer '%ls', expected '%ls'\n", Buffer, String); \
_Check = CheckBuffer(Buffer + SizeOfString / sizeof(Buffer[0]), BufferSize - SizeOfString - sizeof(WCHAR), 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
} while (0)
#define NOTSET
#define TRUE
Definition: types.h:120
#define ERROR_NOACCESS
Definition: winerror.h:578
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
static BOOLEAN CheckBuffer(PVOID Buffer, SIZE_T Size, UCHAR Value)
Definition: bufpool.h:45
#define UlongToPtr(u)
Definition: config.h:106
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_ WDFCOLLECTION _In_ ULONG Index
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define NULL
Definition: types.h:112
_In_ HANDLE Handle
Definition: extypes.h:390
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Definition at line 320 of file GetUserObjectInformation.c.

◆ TestUserObjectInfoWithString [2/2]

#define TestUserObjectInfoWithString (   Handle,
  Index,
  Buffer,
  BufferSize,
  String 
)
Value:
do \
{ \
BOOLEAN _Check; \
TestUserObjectInfo(Handle, Index, NULL, 0, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
TestUserObjectInfo(Handle, Index, (PVOID)1, 0, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
TestUserObjectInfo(Handle, Index, NULL, 1, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
TestUserObjectInfo(Handle, Index, (PVOID)1, 1, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, sizeof(String) - 2, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
_Check = CheckBuffer(Buffer, BufferSize, 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, sizeof(String) - 1, FALSE, ERROR_INSUFFICIENT_BUFFER, sizeof(String) * sizeof(WCHAR));\
_Check = CheckBuffer(Buffer, BufferSize, 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, sizeof(String), TRUE, 0xdeadbeef, sizeof(String)); \
ok(strcmp(Buffer, String) == 0, "Buffer '%s'\n", Buffer); \
_Check = CheckBuffer(Buffer + sizeof(String), BufferSize - sizeof(String), 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
RtlFillMemory(Buffer, BufferSize, 0x55); \
TestUserObjectInfo(Handle, Index, Buffer, BufferSize, TRUE, 0xdeadbeef, sizeof(String)); \
ok(strcmp(Buffer, String) == 0, "Buffer '%s'\n", Buffer); \
_Check = CheckBuffer(Buffer + sizeof(String), BufferSize - sizeof(String), 0x55); \
ok(_Check == TRUE, "CheckBuffer failed\n"); \
} while (0)
#define TRUE
Definition: types.h:120
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#define FALSE
Definition: types.h:117
static BOOLEAN CheckBuffer(PVOID Buffer, SIZE_T Size, UCHAR Value)
Definition: bufpool.h:45
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_ WDFCOLLECTION _In_ ULONG Index
#define NULL
Definition: types.h:112
_In_ HANDLE Handle
Definition: extypes.h:390
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Definition at line 320 of file GetUserObjectInformation.c.

◆ xok

#define xok   ok

Definition at line 34 of file GetUserObjectInformation.c.

Function Documentation

◆ CheckBuffer()

static BOOLEAN CheckBuffer ( PVOID  Buffer,
SIZE_T  Size,
UCHAR  Value 
)
static

Definition at line 17 of file GetUserObjectInformation.c.

21 {
22  PUCHAR Array = Buffer;
23  SIZE_T i;
24 
25  for (i = 0; i < Size; i++)
26  if (Array[i] != Value)
27  {
28  trace("Expected %x, found %x at offset %lu\n", Value, Array[i], (ULONG)i);
29  return FALSE;
30  }
31  return TRUE;
32 }
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define FALSE
Definition: types.h:117
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
#define trace
Definition: atltest.h:70
ULONG_PTR SIZE_T
Definition: typedefs.h:80
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int ULONG
Definition: retypes.h:1

◆ START_TEST()

START_TEST ( GetUserObjectInformation  )

Definition at line 417 of file GetUserObjectInformation.c.

418 {
421 }
static void TestGetUserObjectInfoA(void)
static void TestGetUserObjectInfoW(void)

◆ TestGetUserObjectInfoA()

static void TestGetUserObjectInfoA ( void  )
static

Definition at line 349 of file GetUserObjectInformation.c.

350 {
351  USEROBJECTFLAGS UserObjectFlags;
352  PCHAR Buffer;
353  ULONG BufferSize = 64;
354  HDESK Desktop;
355  HWINSTA WinSta;
356 
358 
364  TestUserObjectInfo(NULL, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags), FALSE, ERROR_INVALID_HANDLE, 0);
365 
371 
377 
379  if (!Desktop)
380  {
381  skip("Failed to get desktop handle\n");
383  return;
384  }
385 
386  WinSta = GetProcessWindowStation();
387  if (!WinSta)
388  {
389  skip("Failed to get winsta handle\n");
391  return;
392  }
393 
399  TestUserObjectInfo(Desktop, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags), TRUE, 0xdeadbeef, sizeof(USEROBJECTFLAGS));
400 
403 
404  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, "WindowStation");
406 
408 
409  /* Make sure nothing behind the needed buffer is touched */
410  BufferSize = sizeof("Desktop");
412  TestUserObjectInfo(Desktop, UOI_TYPE, Buffer, BufferSize, TRUE, 0xdeadbeef, sizeof("Desktop"));
413  TestUserObjectInfo(Desktop, UOI_TYPE, Buffer, BufferSize + 1, TRUE, 0xdeadbeef, sizeof("Desktop"));
415 }
#define NOTSET
signed char * PCHAR
Definition: retypes.h:7
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TestUserObjectInfoWithString(Handle, Index, Buffer, BufferSize, String)
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define TRUE
Definition: types.h:120
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
HDESK WINAPI GetThreadDesktop(_In_ DWORD)
static VOID FreeGuarded(_In_ PVOID Pointer)
Definition: apitest_guard.h:45
#define TestUserObjectInfo(Handle, Index, Buffer, Length, Ret, Error, LengthNeeded)
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
Definition: apitest_guard.h:10
#define ERROR_NOACCESS
Definition: winerror.h:578
#define FALSE
Definition: types.h:117
Definition: bufpool.h:45
static CHAR Desktop[MAX_PATH]
Definition: dem.c:256
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
#define UOI_NAME
Definition: winuser.h:1074
#define UOI_TYPE
Definition: winuser.h:1075
#define UOI_FLAGS
Definition: winuser.h:1073
#define NULL
Definition: types.h:112
HWINSTA WINAPI GetProcessWindowStation(void)
Definition: ntwrapper.h:124
#define skip(...)
Definition: atltest.h:64
unsigned int ULONG
Definition: retypes.h:1
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().

◆ TestGetUserObjectInfoW()

static void TestGetUserObjectInfoW ( void  )
static

Definition at line 107 of file GetUserObjectInformation.c.

108 {
109  USEROBJECTFLAGS UserObjectFlags;
110  PWCHAR Buffer;
111  ULONG BufferSize = 64 * sizeof(WCHAR);
112  HDESK Desktop;
113  HDESK Desktop2;
114  HWINSTA WinSta;
115  HANDLE Token;
116  TOKEN_STATISTICS Statistics;
117  WCHAR WinStaName[64];
118  BOOL Success;
119  ULONG Length;
120 
122 
128  TestUserObjectInfo(NULL, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags), FALSE, ERROR_INVALID_HANDLE, 0);
129 
135 
141 
143  if (!Desktop)
144  {
145  skip("Failed to get desktop handle\n");
147  return;
148  }
149 
150  WinSta = GetProcessWindowStation();
151  if (!WinSta)
152  {
153  skip("Failed to get winsta handle\n");
155  return;
156  }
157 
163  TestUserObjectInfo(Desktop, UOI_FLAGS, &UserObjectFlags, sizeof(UserObjectFlags), TRUE, 0xdeadbeef, sizeof(USEROBJECTFLAGS));
164 
167 
168  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, L"WindowStation");
170 
171  /* Autogenerated name will be Service-0x<luidhigh>-<luidlow>$ */
172  StringCbCopyW(WinStaName, sizeof(WinStaName), L"<failed>");
174  ok(Success == TRUE, "OpenProcessToken failed with %lu\n", GetLastError());
175  if (Success)
176  {
179  &Statistics,
180  sizeof(Statistics),
181  &Length);
182  ok(Success == TRUE, "GetTokenInformation failed with %lu\n", GetLastError());
183  if (Success)
184  {
185  StringCbPrintfW(WinStaName,
186  sizeof(WinStaName),
187  L"Service-0x%lx-%lx$",
188  Statistics.AuthenticationId.HighPart,
189  Statistics.AuthenticationId.LowPart);
190  trace("Expected autogenerated Winsta name: %ls\n", WinStaName);
191  }
193  }
194 
195  /* Create our own Winsta */
197  ok(WinSta != NULL, "CreateWindowStationW failed with %lu\n", GetLastError());
198  if (WinSta)
199  {
200  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, L"WindowStation");
202  CloseWindowStation(WinSta);
203  }
204  else
205  {
206  skip("Failed to create winsta\n");
207  }
208 
210  ok(WinSta != NULL, "CreateWindowStationW failed with %lu\n", GetLastError());
211  if (WinSta)
212  {
213  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, L"WindowStation");
215  CloseWindowStation(WinSta);
216  }
217  else
218  {
219  skip("Failed to create winsta\n");
220  }
221 
222  WinSta = CreateWindowStationW(L"GetUserObjectInformation_apitest_winsta", 0, WINSTA_READATTRIBUTES, NULL);
223  ok(WinSta != NULL, "CreateWindowStationW failed with %lu\n", GetLastError());
224  if (WinSta)
225  {
226  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, L"WindowStation");
227  TestUserObjectInfoWithString(WinSta, UOI_NAME, Buffer, BufferSize, L"GetUserObjectInformation_apitest_winsta");
228  CloseWindowStation(WinSta);
229  }
230  else
231  {
232  skip("Failed to create winsta\n");
233  }
234 
236  ok(WinSta != NULL, "CreateWindowStationW failed with %lu\n", GetLastError());
237  if (WinSta)
238  {
239  TestUserObjectInfoWithString(WinSta, UOI_TYPE, Buffer, BufferSize, L"WindowStation");
241  CloseWindowStation(WinSta);
242  }
243  else
244  {
245  skip("Failed to create winsta\n");
246  }
247 
248  /* Create our own desktop */
250  ok(Desktop2 == NULL, "CreateDesktopW succeeded\n");
251  if (Desktop2) CloseDesktop(Desktop2);
252 
254  ok(Desktop2 == NULL, "CreateDesktopW succeeded\n");
255  if (Desktop2) CloseDesktop(Desktop2);
256 
258  ok(Desktop2 != NULL, "CreateDesktopW failed with %lu\n", GetLastError());
259  if (Desktop2)
260  {
263  }
264  else
265  {
266  skip("Failed to create winsta\n");
267  }
268 
269  CloseDesktop(Desktop2);
270 
272 
273  /* Make sure nothing behind the needed buffer is touched */
274  BufferSize = sizeof(L"Desktop");
276  TestUserObjectInfo(Desktop, UOI_TYPE, Buffer, BufferSize, TRUE, 0xdeadbeef, sizeof(L"Desktop"));
279 }
#define NOTSET
LUID AuthenticationId
Definition: setypes.h:1033
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TestUserObjectInfoWithString(Handle, Index, Buffer, BufferSize, String)
#define CloseHandle
Definition: compat.h:598
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define TRUE
Definition: types.h:120
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE Token
HDESK WINAPI GetThreadDesktop(_In_ DWORD)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
static VOID FreeGuarded(_In_ PVOID Pointer)
Definition: apitest_guard.h:45
uint16_t * PWCHAR
Definition: typedefs.h:56
#define TestUserObjectInfo(Handle, Index, Buffer, Length, Ret, Error, LengthNeeded)
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
Definition: apitest_guard.h:10
#define ERROR_NOACCESS
Definition: winerror.h:578
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DESKTOP_READOBJECTS
Definition: winuser.h:222
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
Definition: bufpool.h:45
static CHAR Desktop[MAX_PATH]
Definition: dem.c:256
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
#define UlongToPtr(u)
Definition: config.h:106
#define trace
Definition: atltest.h:70
#define TOKEN_QUERY
Definition: setypes.h:874
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD LowPart
#define UOI_NAME
Definition: winuser.h:1074
#define WINSTA_READATTRIBUTES
Definition: winuser.h:414
static const WCHAR L[]
Definition: oid.c:1250
LONG HighPart
#define GetCurrentProcess()
Definition: compat.h:618
#define DESKTOP_CREATEWINDOW
Definition: winuser.h:217
#define UOI_TYPE
Definition: winuser.h:1075
#define ok(value,...)
Definition: atltest.h:57
#define UOI_FLAGS
Definition: winuser.h:1073
#define NULL
Definition: types.h:112
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
HWINSTA WINAPI GetProcessWindowStation(void)
Definition: ntwrapper.h:124
#define skip(...)
Definition: atltest.h:64
HWINSTA WINAPI CreateWindowStationW(_In_opt_ LPCWSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseDesktop(_In_ HDESK)
unsigned int ULONG
Definition: retypes.h:1
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:413
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
Definition: desktop.c:473
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by START_TEST().