#include "precomp.h"
#include <apitest_guard.h>
#include <ndk/mmfuncs.h>
#include <ndk/pstypes.h>
#include <strsafe.h>
Go to the source code of this file.
|
#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) |
|
◆ NOTSET
◆ TestUserObjectInfo [1/2]
◆ TestUserObjectInfo [2/2]
◆ TestUserObjectInfoWithString [1/2]
Value: do \
{ \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
} while (0)
#define ERROR_INSUFFICIENT_BUFFER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition at line 320 of file GetUserObjectInformation.c.
◆ TestUserObjectInfoWithString [2/2]
Value: do \
{ \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
ok(_Check ==
TRUE,
"CheckBuffer failed\n"); \
} while (0)
int strcmp(const char *String1, const char *String2)
Definition at line 320 of file GetUserObjectInformation.c.
◆ xok
◆ CheckBuffer()
Definition at line 17 of file GetUserObjectInformation.c.
21{
24
27 {
30 }
32}
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
◆ START_TEST()
◆ TestGetUserObjectInfoA()
static void TestGetUserObjectInfoA |
( |
void |
| ) |
|
|
static |
Definition at line 349 of file GetUserObjectInformation.c.
350{
355 HWINSTA WinSta;
356
358
365
371
377
380 {
381 skip(
"Failed to get desktop handle\n");
383 return;
384 }
385
387 if (!WinSta)
388 {
389 skip(
"Failed to get winsta handle\n");
391 return;
392 }
393
400
403
406
408
409
415}
static VOID FreeGuarded(_In_ PVOID Pointer)
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
DWORD WINAPI GetCurrentThreadId(void)
HWINSTA WINAPI GetProcessWindowStation(void)
HDESK WINAPI GetThreadDesktop(_In_ DWORD)
Referenced by START_TEST().
◆ TestGetUserObjectInfoW()
static void TestGetUserObjectInfoW |
( |
void |
| ) |
|
|
static |
Definition at line 107 of file GetUserObjectInformation.c.
108{
113 HDESK Desktop2;
114 HWINSTA WinSta;
117 WCHAR WinStaName[64];
120
122
129
135
141
144 {
145 skip(
"Failed to get desktop handle\n");
147 return;
148 }
149
151 if (!WinSta)
152 {
153 skip(
"Failed to get winsta handle\n");
155 return;
156 }
157
164
167
170
171
176 {
179 &Statistics,
180 sizeof(Statistics),
184 {
186 sizeof(WinStaName),
187 L"Service-0x%lx-%lx$",
190 trace(
"Expected autogenerated Winsta name: %ls\n", WinStaName);
191 }
193 }
194
195
198 if (WinSta)
199 {
203 }
204 else
205 {
206 skip(
"Failed to create winsta\n");
207 }
208
211 if (WinSta)
212 {
216 }
217 else
218 {
219 skip(
"Failed to create winsta\n");
220 }
221
224 if (WinSta)
225 {
229 }
230 else
231 {
232 skip(
"Failed to create winsta\n");
233 }
234
237 if (WinSta)
238 {
242 }
243 else
244 {
245 skip(
"Failed to create winsta\n");
246 }
247
248
250 ok(Desktop2 ==
NULL,
"CreateDesktopW succeeded\n");
252
254 ok(Desktop2 ==
NULL,
"CreateDesktopW succeeded\n");
256
259 if (Desktop2)
260 {
263 }
264 else
265 {
266 skip(
"Failed to create winsta\n");
267 }
268
270
272
273
279}
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define GetCurrentProcess()
_In_ ULONG _In_ ULONG _In_ ULONG Length
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
DWORD WINAPI GetLastError(void)
#define DESKTOP_CREATEWINDOW
HWINSTA WINAPI CreateWindowStationW(_In_opt_ LPCWSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
#define WINSTA_READATTRIBUTES
#define DESKTOP_READOBJECTS
BOOL WINAPI CloseDesktop(_In_ HDESK)
Referenced by START_TEST().