40 Params.NamedPipeType = NamedPipeType;
41 Params.ReadMode = ReadMode;
42 Params.CompletionMode = CompletionMode;
43 Params.MaximumInstances = MaximumInstances;
44 Params.InboundQuota = InboundQuota;
45 Params.OutboundQuota = OutboundQuota;
48 Params.DefaultTimeout.QuadPart = DefaultTimeout->QuadPart;
53 Params.DefaultTimeout.QuadPart = 0;
92 ULONG NamedPipeConfiguration,
93 ULONG MaximumInstances,
108 ASSERTMSG(
"Invalid NamedPipeConfiguration parameter value!\n",
FALSE);
112 DefaultTimeout.
QuadPart = -50 * 1000 * 10;
183 IN ULONG NamedPipeConfiguration)
195 ASSERTMSG(
"Invalid NamedPipeConfiguration parameter value!\n",
FALSE);
230 Status = ZwWaitForSingleObject(ServerHandle,
298 if (WaitForBuffer ==
NULL)
349 PendingReturned =
TRUE;
434#define ok_eq_print_(value, expected, spec, FileAndLine) \
435 KmtOk((value) == (expected), FileAndLine, #value " = " spec ", expected " spec "\n", value, expected)
436#define ok_eq_ulong_(value, expected) ok_eq_print_(value, expected, "%lu", FileAndLine)
437#define ok_eq_ulonglong_(value, expected) ok_eq_print_(value, expected, "%I64u", FileAndLine)
439#define ok_eq_ulongptr_(value, expected) ok_eq_print_(value, (ULONG_PTR)(expected), "%lu", FileAndLine)
441#define ok_eq_ulongptr_(value, expected) ok_eq_print_(value, (ULONG_PTR)(expected), "%I64u", FileAndLine)
443#define ok_eq_hex_(value, expected) ok_eq_print_(value, expected, "0x%08lx", FileAndLine)
453 IN ULONG NamedPipeConfiguration,
473 Status = ZwQueryInformationFile(ServerHandle,
486 Status = ZwQueryInformationFile(ServerHandle,
489 sizeof(PipeLocalInfo),
506 RtlFillMemory(&PipeRemoteInfo,
sizeof(PipeRemoteInfo), 0x55);
507 Status = ZwQueryInformationFile(ServerHandle,
510 sizeof(PipeRemoteInfo),
527 IN ULONG NamedPipeConfiguration,
547 Status = ZwQueryInformationFile(ClientHandle,
560 Status = ZwQueryInformationFile(ClientHandle,
563 sizeof(PipeLocalInfo),
580 RtlFillMemory(&PipeRemoteInfo,
sizeof(PipeRemoteInfo), 0x55);
581 Status = ZwQueryInformationFile(ClientHandle,
584 sizeof(PipeRemoteInfo),
623 sizeof(PipeLocalInfo),
630 RtlFillMemory(&PipeRemoteInfo,
sizeof(PipeRemoteInfo), 0x55);
634 sizeof(PipeRemoteInfo),
VOID NpCheckServerPipe_(IN HANDLE ServerHandle, IN ULONG ReadMode, IN ULONG CompletionMode, IN ULONG NamedPipeType, IN ULONG NamedPipeConfiguration, IN ULONG MaximumInstances, IN ULONG CurrentInstances, IN ULONG InboundQuota, IN ULONG ReadDataAvailable, IN ULONG OutboundQuota, IN ULONG WriteQuotaAvailable, IN ULONG NamedPipeState, IN PCSTR FileAndLine)
#define ok_eq_ulongptr_(value, expected)
NTSTATUS NpCreatePipe(OUT PHANDLE ServerHandle, PCWSTR PipePath, ULONG ReadMode, ULONG CompletionMode, ULONG NamedPipeType, ULONG NamedPipeConfiguration, ULONG MaximumInstances, ULONG InboundQuota, ULONG OutboundQuota)
NTSTATUS NpOpenPipeEx(OUT PHANDLE ClientHandle, IN PCWSTR PipePath, IN ACCESS_MASK DesiredAccess, IN ULONG ShareAccess, IN ULONG Disposition, IN ULONG CreateOptions)
BOOLEAN WaitForWork(IN PTHREAD_CONTEXT Context, IN ULONG MilliSeconds)
NTSTATUS NpOpenPipe(OUT PHANDLE ClientHandle, IN PCWSTR PipePath, IN ULONG NamedPipeConfiguration)
NTSTATUS NpCreatePipeEx(OUT PHANDLE ServerHandle, IN PCWSTR PipePath, IN ULONG ReadMode, IN ULONG CompletionMode, IN ULONG NamedPipeType, IN ULONG ShareAccess, IN ULONG MaximumInstances, IN ULONG InboundQuota, IN ULONG OutboundQuota, IN ACCESS_MASK DesiredAccess, IN ULONG Disposition, IN ULONG CreateOptions, IN PLARGE_INTEGER DefaultTimeout OPTIONAL)
NTSTATUS NpWritePipe(IN HANDLE PipeHandle, IN const VOID *Buffer, IN ULONG BufferSize, OUT PULONG_PTR BytesWritten)
VOID FinishWorkerThread(IN PTHREAD_CONTEXT Context)
NTSTATUS NpControlPipe(IN HANDLE ServerHandle, IN ULONG FsControlCode, IN PVOID InputBuffer, IN ULONG InputBufferLength)
NTSTATUS NpReadPipe(IN HANDLE PipeHandle, OUT PVOID Buffer, IN ULONG BufferSize, OUT PULONG_PTR BytesRead)
BOOLEAN TriggerWork(IN PTHREAD_CONTEXT Context, IN ULONG MilliSeconds)
static KSTART_ROUTINE PipeWorkerThread
VOID StartWorkerThread(OUT PTHREAD_CONTEXT Context)
#define ok_eq_hex_(value, expected)
NTSTATUS NpWaitPipe(IN PCWSTR PipeName, IN PLARGE_INTEGER Timeout)
#define ok_eq_ulonglong_(value, expected)
VOID NpCheckClientPipe_(IN HANDLE ClientHandle, IN ULONG ReadMode, IN ULONG CompletionMode, IN ULONG NamedPipeType, IN ULONG NamedPipeConfiguration, IN ULONG MaximumInstances, IN ULONG CurrentInstances, IN ULONG InboundQuota, IN ULONG ReadDataAvailable, IN ULONG OutboundQuota, IN ULONG WriteQuotaAvailable, IN ULONG NamedPipeState, IN PCSTR FileAndLine)
VOID NpQueryPipe_(IN HANDLE PipeHandle, IN NTSTATUS ExpectedStatus, IN PCSTR FileAndLine)
#define ok_eq_ulong_(value, expected)
static BOOLEAN CheckBuffer(PVOID Buffer, SIZE_T Size, UCHAR Value)
#define ok_eq_hex(value, expected)
#define ok_bool_true(value, desc)
#define ok_eq_ulongptr(value, expected)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK _In_ USHORT ShareAccess
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG FsControlCode
@ FilePipeLocalInformation
#define FILE_SYNCHRONOUS_IO_NONALERT
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define RtlFillMemory(Dest, Length, Fill)
PKTHREAD KmtStartThread(IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext OPTIONAL)
VOID KmtFinishThread(IN PKTHREAD Thread OPTIONAL, IN PKEVENT Event OPTIONAL)
#define ExFreePoolWithTag(_P, _T)
#define DEVICE_NAMED_PIPE
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
#define FILE_PIPE_FULL_DUPLEX
#define FILE_PIPE_OUTBOUND
#define FILE_PIPE_INBOUND
#define FILE_PIPE_CLIENT_END
#define FILE_PIPE_SERVER_END
#define FILE_READ_ATTRIBUTES
#define ASSERTMSG(msg, exp)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
NTSYSAPI NTSTATUS NTAPI ZwFsControlFile(IN HANDLE DeviceHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG IoControlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, OUT PVOID OutputBuffer, IN ULONG OutputBufferSize)
NTSTATUS NTAPI IoCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG Disposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength, IN CREATE_FILE_TYPE CreateFileType, IN PVOID ExtraCreateParameters OPTIONAL, IN ULONG Options)
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
#define STATUS_INVALID_PARAMETER_6
#define STATUS_INVALID_PARAMETER_3
PULONG MinorVersion OPTIONAL
#define RTL_CONSTANT_STRING(s)
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_opt_ PWDF_USB_PIPE_INFORMATION PipeInfo
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
@ CreateFileTypeNamedPipe