24 #define WIN32_NO_STATUS 34 #ifndef __WINE_WINTERNL_H 54 #ifndef FILE_SYNCHRONOUS_IO_ALERT 55 #define FILE_SYNCHRONOUS_IO_ALERT 0x10 58 #ifndef FILE_SYNCHRONOUS_IO_NONALERT 59 #define FILE_SYNCHRONOUS_IO_NONALERT 0x20 62 #ifndef FSCTL_PIPE_LISTEN 63 #define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS) 90 #define loadfunc(name) if (!(p##name = (void *)GetProcAddress(module, #name))) { \ 91 trace("GetProcAddress(%s) failed\n", #name); \ 116 static const WCHAR testpipe[] = {
'\\',
'\\',
'.',
'\\',
'p',
'i',
'p',
'e',
'\\',
117 't',
'e',
's',
't',
'p',
'i',
'p',
'e', 0 };
119 't',
'e',
's',
't',
'p',
'i',
'p',
'e', 0 };
132 attr.RootDirectory = 0;
134 attr.Attributes = 0x40;
136 attr.SecurityQualityOfService =
NULL;
173 attr.RootDirectory = 0;
175 attr.Attributes = 0x40;
177 attr.SecurityQualityOfService =
NULL;
183 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &
timeout);
190 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &
timeout);
197 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &
timeout);
204 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &
timeout);
205 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
212 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &
timeout);
231 static const DWORD pipe_config[]= { 1, 0, 2 };
240 ok(0,
"NtCreateNamedPipeFile returned %x, sharing: %x\n",
res,
sharing[
j]);
248 ok(!
res,
"NtQueryInformationFile for server returned %x, sharing: %x\n",
res,
sharing[
j]);
249 ok(
info.NamedPipeConfiguration == pipe_config[
j],
"wrong duplex status for pipe: %d, expected %d\n",
250 info.NamedPipeConfiguration, pipe_config[
j]);
255 ok(!
res,
"NtQueryInformationFile for client returned %x, access: %x, sharing: %x\n",
257 ok(
info.NamedPipeConfiguration == pipe_config[
j],
"wrong duplex status for pipe: %d, expected %d\n",
258 info.NamedPipeConfiguration, pipe_config[
j]);
294 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
317 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
341 static const char buf[] =
"testdata";
353 memset(&ov, 0,
sizeof(ov));
373 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %u\n", num_bytes);
379 ok(
key == 0xdeadbeef,
"expected 0xdeadbeef, got %lx\n",
key);
380 ok(pov == &ov,
"expected %p, got %p\n", &ov, pov);
393 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %u\n", num_bytes);
395 pov = (
void *)0xdeadbeef;
397 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
398 ok(pov ==
NULL,
"expected NULL, got %p\n", pov);
422 ret = pQueueUserAPC(&
userapc, main_thread, 0);
456 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
526 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
568 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
575 res = pNtCancelIoFile(hPipe, &cancel_sb);
576 ok(!
res,
"NtCancelIoFile returned %x\n",
res);
589 if (pNtCancelIoFileEx)
592 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
598 res = pNtCancelIoFileEx(hPipe, &
iosb, &cancel_sb);
599 ok(!
res,
"NtCancelIoFileEx returned %x\n",
res);
607 win_skip(
"NtCancelIoFileEx not available\n");
619 memset(&fpi, 0x55,
sizeof(fpi));
621 ok_(__FILE__,
line)(!
res,
"NtQueryInformationFile returned %x\n",
res);
628 #define check_pipe_handle_state(handle, r, c) _check_pipe_handle_state(__LINE__, handle, r, c) 643 attr.RootDirectory = 0;
645 attr.Attributes = 0x40;
647 attr.SecurityQualityOfService =
NULL;
663 0, 0, 0, 1, 0xFFFFFFFF, 500, 500, &
timeout);
664 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
707 ok(!
res,
"NtSetInformationFile returned %x\n",
res);
740 0, 1, 1, 0, 0xFFFFFFFF, 500, 500, &
timeout);
741 ok(!
res,
"NtCreateNamedPipeFile returned %x\n",
res);
757 ok(!
res,
"NtSetInformationFile returned %x\n",
res);
766 ok(!
res,
"NtSetInformationFile returned %x\n",
res);
791 ok(!
res,
"NtSetInformationFile returned %x\n",
res);
815 ok(!
iosb.Status,
"iosb.Status = %x\n",
iosb.Status);
816 ok(
buf.ReadDataAvailable == 1,
"ReadDataAvailable = %u\n",
buf.ReadDataAvailable);
822 ok(
buf.ReadDataAvailable == 1,
"ReadDataAvailable = %u\n",
buf.ReadDataAvailable);
823 ok(!
iosb.Status,
"iosb.Status = %x\n",
iosb.Status);
829 #define PIPENAME "\\\\.\\pipe\\ntdll_tests_pipe.c" 877 U(
iosb).Status = 0xdeadbabe;
878 iosb.Information = 0xdeadbeef;
885 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
886 ok( !apc_count,
"apc was called\n" );
891 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
894 ok( !apc_count,
"apc was called\n" );
897 ok( !apc_count,
"apc was called\n" );
899 ok( apc_count == 1,
"apc not called\n" );
903 U(
iosb).Status = 0xdeadbabe;
904 iosb.Information = 0xdeadbeef;
910 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
911 ok( !apc_count,
"apc was called\n" );
916 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
918 ok( !apc_count,
"apc was called\n" );
921 ok( !apc_count,
"apc was called\n" );
923 ok( apc_count == 1,
"apc not called\n" );
927 U(
iosb).Status = 0xdeadbabe;
928 iosb.Information = 0xdeadbeef;
938 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
940 ok( !apc_count,
"apc was called\n" );
942 ok( !apc_count,
"apc was called\n" );
944 ok( apc_count == 1,
"apc not called\n" );
948 U(
iosb).Status = 0xdeadbabe;
949 iosb.Information = 0xdeadbeef;
964 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
966 ok( !apc_count,
"apc was called\n" );
968 ok( !apc_count,
"apc was called\n" );
970 ok( apc_count == 1,
"apc not called\n" );
975 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
977 ok( !apc_count,
"apc was called\n" );
979 ok( !apc_count,
"apc was called\n" );
981 ok( apc_count == 1,
"apc not called\n" );
985 U(
iosb).Status = 0xdeadbabe;
986 iosb.Information = 0xdeadbeef;
992 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
993 ok( !apc_count,
"apc was called\n" );
1000 ok(
iosb.Information == 1,
"wrong info %lu\n",
iosb.Information );
1001 ok( !apc_count,
"apc was called\n" );
1003 ok( apc_count == 1,
"apc was not called\n" );
1007 U(
iosb).Status = 0xdeadbabe;
1008 iosb.Information = 0xdeadbeef;
1013 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1015 ok( !apc_count,
"apc was called\n" );
1017 ok( !apc_count,
"apc was called\n" );
1022 U(
iosb).Status = 0xdeadbabe;
1023 iosb.Information = 0xdeadbeef;
1027 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1028 ok( !apc_count,
"apc was called\n" );
1030 ok( !apc_count,
"apc was called\n" );
1035 U(
iosb).Status = 0xdeadbabe;
1036 iosb.Information = 0xdeadbeef;
1041 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1043 ok( !apc_count,
"apc was called\n" );
1045 ok( !apc_count,
"apc was called\n" );
1050 U(
iosb).Status = 0xdeadbabe;
1051 iosb.Information = 0xdeadbeef;
1056 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1057 ok( !apc_count,
"apc was called\n" );
1061 ok(
iosb.Information == 0,
"wrong info %lu\n",
iosb.Information );
1063 ok( !apc_count,
"apc was called\n" );
1065 ok( apc_count == 1,
"apc was not called\n" );
1073 U(
iosb).Status = 0xdeadbabe;
1074 iosb.Information = 0xdeadbeef;
1079 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1080 ok( !apc_count,
"apc was called\n" );
1086 ok(
iosb.Information == 0,
"wrong info %lu\n",
iosb.Information );
1088 ok( !apc_count,
"apc was called\n" );
1090 ok( apc_count == 1,
"apc was not called\n" );
1093 U(
iosb).Status = 0xdeadbabe;
1094 iosb.Information = 0xdeadbeef;
1099 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1100 ok( !apc_count,
"apc was called\n" );
1105 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1112 ok(
iosb.Information == 0,
"wrong info %lu\n",
iosb.Information );
1114 ok( !apc_count,
"apc was called\n" );
1116 ok( apc_count == 1,
"apc was not called\n" );
1120 if (pNtCancelIoFileEx)
1126 U(
iosb).Status = 0xdeadbabe;
1127 iosb.Information = 0xdeadbeef;
1132 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1133 ok( !apc_count,
"apc was called\n" );
1138 ok(
iosb.Information == 0,
"wrong info %lu\n",
iosb.Information );
1140 ok( !apc_count,
"apc was called\n" );
1142 ok( apc_count == 1,
"apc was not called\n" );
1146 U(
iosb).Status = 0xdeadbabe;
1147 iosb.Information = 0xdeadbeef;
1152 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1153 ok( !apc_count,
"apc was called\n" );
1158 ok(
iosb.Information == 0xdeadbeef,
"wrong info %lu\n",
iosb.Information );
1159 ok( !apc_count,
"apc was called\n" );
1164 ok(
iosb.Information == 0,
"wrong info %lu\n",
iosb.Information );
1166 ok( !apc_count,
"apc was called\n" );
1168 ok( apc_count == 2,
"apc was not called\n" );
1174 win_skip(
"NtCancelIoFileEx not available\n");
1193 ok(
iosb.Information ==
sizeof(*device_info),
"Information = %lu\n",
iosb.Information );
1202 ok(
iosb.Information ==
sizeof(*device_info),
"Information = %lu\n",
iosb.Information );
1212 #define test_file_name_fail(a,b) _test_file_name_fail(__LINE__,a,b) 1220 ok_(__FILE__,
line)(
status == expected_status,
"NtQueryInformationFile failed: %x, expected %x\n",
1221 status, expected_status );
1224 #define test_file_name(a) _test_file_name(__LINE__,a) 1233 {
'\\',
'n',
't',
'd',
'l',
'l',
'_',
't',
'e',
's',
't',
's',
'_',
'p',
'i',
'p',
'e',
'.',
'c'};
1241 "Information = %lu\n",
iosb.Information );
1251 ok(
iosb.Information == 20,
"Information = %lu\n",
iosb.Information );
1289 "Failed to query object security descriptor length: %08x\n",
status);
1359 #define test_group(a,b,c) _test_group(__LINE__,a,b,c) 1368 if (!sec_desc)
return;
1372 "Failed to query group from security descriptor: %08x\n",
status);
1374 ok_(__FILE__,
line)(
EqualSid(group_sid, expected_sid),
"SIDs are not equal\n");
1386 SID *world_sid, *local_sid;
1391 trace(
"security tests...\n");
1399 ok(
ret,
"InitializeSecurityDescriptor failed\n");
1402 ok(
ret,
"SetSecurityDescriptorOwner failed\n");
1405 ok(
ret,
"SetSecurityDescriptorGroup failed\n");
1408 0x20000, 0x20000, 0,
NULL);
1419 ok(
ret,
"SetSecurityDescriptorGroup failed\n");
1428 0x20000, 0x20000, 0,
NULL);
1434 ok(
ret,
"SetSecurityDescriptorGroup failed\n");
1465 sec_attr.
nLength =
sizeof(sec_attr);
1469 ok(
ret,
"SetSecurityDescriptorGroup failed\n");
1471 0x20000, 0x20000, 0, &sec_attr);
1481 0x20000, 0x20000, 0, &sec_attr);
1497 trace(
"starting invalid create tests\n");
1500 trace(
"starting create tests\n");
1503 trace(
"starting overlapped tests\n");
1506 trace(
"starting completion tests\n");
1509 trace(
"starting FILE_PIPE_INFORMATION tests\n");
1512 if (!pOpenThread || !pQueueUserAPC)
1515 trace(
"starting alertable tests\n");
1518 trace(
"starting nonalertable tests\n");
1521 trace(
"starting cancelio tests\n");
1524 trace(
"starting byte read in byte mode client -> server\n");
1526 trace(
"starting byte read in message mode client -> server\n");
1528 trace(
"starting message read in message mode client -> server\n");
1530 trace(
"starting byte read in byte mode server -> client\n");
1532 trace(
"starting byte read in message mode server -> client\n");
1534 trace(
"starting message read in message mode server -> client\n");
#define check_pipe_handle_state(handle, r, c)
static void _check_pipe_handle_state(int line, HANDLE handle, ULONG read, ULONG completion)
struct _FILE_PIPE_INFORMATION FILE_PIPE_INFORMATION
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG in_size
static BOOL DWORD dwThreadId
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI WaitForSingleObjectEx(IN HANDLE hHandle, IN DWORD dwMilliseconds, IN BOOL bAlertable)
static PIO_STATUS_BLOCK void ULONG FS_INFORMATION_CLASS info_class
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG sharing
static SID * well_known_sid(WELL_KNOWN_SID_TYPE sid_type)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK iosb
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
VOID(* PIO_APC_ROUTINE)(IN PVOID ApcContext, IN PIO_STATUS_BLOCK IoStatusBlock, IN ULONG Reserved)
static rfbScreenInfoPtr server
#define STATUS_PIPE_DISCONNECTED
#define FILE_SYNCHRONOUS_IO_NONALERT
static void _test_file_name(unsigned line, HANDLE pipe)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define STATUS_INFO_LENGTH_MISMATCH
#define SECURITY_MAX_SID_SIZE
static BOOL open_succeeded
#define SECURITY_DESCRIPTOR_MIN_LENGTH
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG ULONG ULONG ULONG inbound_quota
#define PIPE_TYPE_MESSAGE
static NTSTATUS(WINAPI *pNtFsControlFile)(HANDLE handle
#define STATUS_INVALID_PARAMETER
char * wine_dbgstr_w(const wchar_t *wstr)
static void test_nonalertable(void)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
GLuint GLuint GLsizei count
static BOOL userapc_called
#define FILE_DEVICE_NAMED_PIPE
static TOKEN_PRIMARY_GROUP * get_current_group(void)
BOOL WINAPI GetQueuedCompletionStatus(IN HANDLE CompletionHandle, IN LPDWORD lpNumberOfBytesTransferred, OUT PULONG_PTR lpCompletionKey, OUT LPOVERLAPPED *lpOverlapped, IN DWORD dwMilliseconds)
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
static void _test_file_name_fail(unsigned line, HANDLE pipe, NTSTATUS expected_status)
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG Length
static BOOL is_signaled(HANDLE obj)
static OUT PIO_STATUS_BLOCK OUT PVOID FileInformation
#define INVALID_HANDLE_VALUE
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(VOID)
#define test_file_name_fail(a, b)
static PSECURITY_DESCRIPTOR get_security_descriptor(HANDLE handle, BOOL todo)
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG ULONG ULONG max_inst
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG ULONG ULONG ULONG ULONG outbound_quota
#define GROUP_SECURITY_INFORMATION
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
#define NMPWAIT_USE_DEFAULT_WAIT
static PIO_STATUS_BLOCK PVOID ULONG len
static BOOL init_func_ptrs(void)
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG dispo
#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
static void test_security_info(void)
static HANDLE PIO_APC_ROUTINE apc
static void test_cancelio(void)
#define FILE_WRITE_ATTRIBUTES
#define STATUS_INVALID_HANDLE
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, BOOL bOwnerDefaulted)
#define STATUS_BUFFER_TOO_SMALL
GLfloat GLfloat GLfloat GLfloat h
#define SECURITY_DESCRIPTOR_REVISION
GLenum GLuint GLenum GLsizei const GLchar * buf
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSID *Group, OUT PBOOLEAN GroupDefaulted)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
#define DUPLICATE_SAME_ACCESS
static void test_file_info(void)
HANDLE WINAPI GetCurrentThread(VOID)
#define ERROR_ACCESS_DENIED
static void test_alertable(void)
static BOOL bInheritHandle
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 token
static struct _test_info info[]
GLenum GLuint GLenum GLsizei length
#define test_file_name(a)
static ULONG POBJECT_ATTRIBUTES attr
BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, BOOL bGroupDefaulted)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
static void test_filepipeinfo(void)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
static BOOL create_pipe_pair(HANDLE *read, HANDLE *write, ULONG flags, ULONG type, ULONG size)
static void(WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING target
#define test_group(a, b, c)
DWORD WINAPI GetCurrentThreadId(VOID)
#define FSCTL_PIPE_LISTEN
enum _FSINFOCLASS FS_INFORMATION_CLASS
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 GLint GLint j
static const WCHAR nameW[]
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID in_buffer
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
static void test_completion(void)
static PIO_STATUS_BLOCK io_status
static NTSTATUS listen_pipe(HANDLE hPipe, HANDLE hEvent, PIO_STATUS_BLOCK iosb, BOOL use_apc)
NTSTATUS NTAPI NtQuerySecurityObject(IN HANDLE Handle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN ULONG Length, OUT PULONG ResultLength)
#define STATUS_OBJECT_TYPE_MISMATCH
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
static HANDLE ULONG_PTR dwData
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL WINAPI SetNamedPipeHandleState(HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout)
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
static void test_volume_info(void)
#define PIPE_ACCESS_DUPLEX
#define todo_wine_if(is_todo)
static void test_create_invalid(void)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG code
NTSTATUS WINAPI NtSetSecurityObject(HANDLE Handle, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR SecurityDescriptor)
#define STATUS_ACCESS_DENIED
static PIO_STATUS_BLOCK PVOID ptr
#define PIPE_ACCESS_OUTBOUND
static HANDLE PIO_APC_ROUTINE PVOID apc_context
#define FILE_READ_ATTRIBUTES
#define STATUS_PIPE_BROKEN
static NTSTATUS create_pipe(PHANDLE handle, ULONG sharing, ULONG options)
#define STATUS_PIPE_CONNECTED
#define FILE_SYNCHRONOUS_IO_ALERT
static HANDLE(WINAPI *pOpenThread)(DWORD dwDesiredAccess
static PIO_STATUS_BLOCK void ULONG length
static void test_overlapped(void)
BOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define GetCurrentProcess()
static void CALLBACK userapc(ULONG_PTR dwParam)
static TOKEN_OWNER * get_current_owner(void)
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG ULONG ULONG ULONG ULONG PLARGE_INTEGER timeout
static HRESULT process_group(struct ciffile *file, struct inf_section *section, const char *section_name)
static void CALLBACK ioapc(void *arg, PIO_STATUS_BLOCK io, ULONG reserved)
#define PIPE_READMODE_MESSAGE
HANDLE WINAPI CreateIoCompletionPort(IN HANDLE FileHandle, IN HANDLE ExistingCompletionPort, IN ULONG_PTR CompletionKey, IN DWORD NumberOfConcurrentThreads)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID out_buffer
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
#define STATUS_BUFFER_OVERFLOW
LPVOID lpSecurityDescriptor
#define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL
GLuint GLint GLboolean GLint GLenum access
#define PIPE_ACCESS_INBOUND
static OUT PIO_STATUS_BLOCK IoStatusBlock
void CALLBACK completion(DWORD dwError, DWORD cbTransferred, LPWSAOVERLAPPED lpOverlapped, DWORD dwFlags)
#define OWNER_SECURITY_INFORMATION
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG options
static DWORD WINAPI thread(PVOID main_thread)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
static const WCHAR testpipe[]
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG ULONG completion_mode
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG ULONG read_mode
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG ULONG ULONG ULONG pipe_type
static void test_peek(HANDLE pipe)
static PIO_STATUS_BLOCK void * buffer
NTSTATUS NTAPI NtCancelIoFile(IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static void test_create(void)
#define GetProcAddress(x, y)
static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
static void _test_group(unsigned line, HANDLE handle, SID *expected_sid, BOOL todo)
GLuint GLuint GLsizei GLenum type
struct _FILE_PIPE_LOCAL_INFORMATION FILE_PIPE_LOCAL_INFORMATION
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_FLAG_OVERLAPPED
BOOL WINAPI CreateWellKnownSid(IN WELL_KNOWN_SID_TYPE WellKnownSidType, IN PSID DomainSid OPTIONAL, OUT PSID pSid, IN OUT DWORD *cbSid)
NTSTATUS NTAPI NtCreateNamedPipeFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN ULONG NamedPipeType, IN ULONG ReadMode, IN ULONG CompletionMode, IN ULONG MaximumInstances, IN ULONG InboundQuota, IN ULONG OutboundQuota, IN PLARGE_INTEGER DefaultTimeout)
static SERVICE_STATUS status
#define STATUS_ILLEGAL_FUNCTION
#define HeapFree(x, y, z)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
static const WCHAR testpipe_nt[]
NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
#define ERROR_INSUFFICIENT_BUFFER
GLuint const GLchar * name