12#define TEST_CONNECTION_INFO_SIGNATURE1 0xaabb0123
13#define TEST_CONNECTION_INFO_SIGNATURE2 0xaabb0124
19#define TEST_MESSAGE_MESSAGE 0x4455cdef
48 "TotalLength = %u, expected %lu\n",
51 "DataLength = %u\n",
Message.Header.u1.s1.DataLength);
53 "Type = %x\n",
Message.Header.u2.s2.Type);
55 "UniqueProcess = %p, expected %lx\n",
58 "UniqueThread = %p, expected %x\n",
70 ok(PortHandle == (
PVOID)(
ULONG_PTR)0x55555555,
"PortHandle = %p\n", PortHandle);
79 "TotalLength = %u, expected %lu\n",
82 "DataLength = %u\n",
Message.Header.u1.s1.DataLength);
84 "Type = %x\n",
Message.Header.u2.s2.Type);
86 "UniqueProcess = %p, expected %lx\n",
89 "UniqueThread = %p, expected %x\n",
112 "TotalLength = %u, expected %Iu\n",
115 "DataLength = %u\n",
Message.Header.u1.s1.DataLength);
117 "Type = %x\n",
Message.Header.u2.s2.Type);
119 "UniqueProcess = %p, expected %lx\n",
122 "UniqueThread = %p, expected %x\n",
140 ULONG ConnectInfoLength;
144 SecurityQos.
Length =
sizeof(SecurityQos);
151 ConnectInfoLength =
sizeof(ConnectInfo);
162 ok(PortHandle == (
PVOID)(
ULONG_PTR)0x55555555,
"PortHandle = %p\n", PortHandle);
166 ConnectInfoLength =
sizeof(ConnectInfo);
178 skip(
"Failed to connect\n");
216 skip(
"Failed to create port\n");
226 ok(ThreadHandles[0] !=
NULL,
"_beginthreadex failed\n");
234 ok(ThreadHandles[1] !=
NULL,
"_beginthreadex failed\n");
static UINT ClientThreadId
static UNICODE_STRING PortName
#define TEST_MESSAGE_MESSAGE
static UINT ServerThreadId
struct _TEST_MESSAGE TEST_MESSAGE
struct _TEST_CONNECTION_INFO TEST_CONNECTION_INFO
#define TEST_CONNECTION_INFO_SIGNATURE2
#define TEST_CONNECTION_INFO_SIGNATURE1
struct _TEST_CONNECTION_INFO * PTEST_CONNECTION_INFO
UINT CALLBACK ClientThread(_Inout_ PVOID Parameter)
UINT CALLBACK ServerThread(_Inout_ PVOID Parameter)
struct _TEST_MESSAGE * PTEST_MESSAGE
#define ok_hex(expression, result)
#define UlongToHandle(ul)
NTSTATUS NTAPI NtAcceptConnectPort(OUT PHANDLE PortHandle, IN PVOID PortContext OPTIONAL, IN PPORT_MESSAGE ReplyMessage, IN BOOLEAN AcceptConnection, IN OUT PPORT_VIEW ServerView OPTIONAL, OUT PREMOTE_PORT_VIEW ClientView OPTIONAL)
NTSTATUS NTAPI NtCompleteConnectPort(IN HANDLE PortHandle)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static const WCHAR Message[]
#define OBJ_CASE_INSENSITIVE
#define LPC_CONNECTION_REQUEST
#define InitializeObjectAttributes(p, n, a, r, s)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
NTSTATUS NTAPI NtConnectPort(OUT PHANDLE PortHandle, IN PUNICODE_STRING PortName, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, IN OUT PPORT_VIEW ClientView OPTIONAL, IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL, OUT PULONG MaxMessageLength OPTIONAL, IN OUT PVOID ConnectionInformation OPTIONAL, IN OUT PULONG ConnectionInformationLength OPTIONAL)
NTSTATUS NTAPI NtCreatePort(OUT PHANDLE PortHandle, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG MaxConnectInfoLength, IN ULONG MaxDataLength, IN ULONG MaxPoolUsage)
NTSTATUS NTAPI NtListenPort(IN HANDLE PortHandle, OUT PPORT_MESSAGE ConnectMessage)
NTSTATUS NTAPI NtReplyWaitReceivePort(IN HANDLE PortHandle, OUT PVOID *PortContext OPTIONAL, IN PPORT_MESSAGE ReplyMessage OPTIONAL, OUT PPORT_MESSAGE ReceiveMessage)
NTSTATUS NTAPI NtRequestPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest)
#define STATUS_PORT_CONNECTION_REFUSED
NTSTATUS NTAPI NtWaitForMultipleObjects(IN ULONG ObjectCount, IN PHANDLE HandleArray, IN WAIT_TYPE WaitType, IN BOOLEAN Alertable, IN PLARGE_INTEGER TimeOut OPTIONAL)
_CRTIMP uintptr_t __cdecl _beginthreadex(_In_opt_ void *_Security, _In_ unsigned _StackSize, _In_ unsigned(__stdcall *_StartAddress)(void *), _In_opt_ void *_ArgList, _In_ unsigned _InitFlag, _Out_opt_ unsigned *_ThrdAddr)
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
#define RTL_CONSTANT_STRING(s)
#define RtlZeroMemory(Destination, Length)
DWORD WINAPI GetCurrentProcessId(void)
_Inout_opt_ PVOID Parameter
#define SECURITY_STATIC_TRACKING