3 Copyright (c) Alex Ionescu. All rights reserved.
11 Function definitions for the Local Procedure Call.
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
31 #ifndef NTOS_MODE_USER
35 LpcRequestWaitReplyPort(
37 _In_ PPORT_MESSAGE LpcMessageRequest
,
38 _Out_ PPORT_MESSAGE LpcMessageReply
45 _In_ PPORT_MESSAGE LpcMessage
56 _Out_ PHANDLE PortHandle
,
57 _In_opt_ PVOID PortContext
,
58 _In_ PPORT_MESSAGE ConnectionRequest
,
59 _In_ BOOLEAN AcceptConnection
,
60 _Inout_opt_ PPORT_VIEW ServerView
,
61 _Out_opt_ PREMOTE_PORT_VIEW ClientView
67 NtCompleteConnectPort(
68 _In_ HANDLE PortHandle
75 _Out_ PHANDLE PortHandle
,
76 _In_ PUNICODE_STRING PortName
,
77 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos
,
78 _Inout_opt_ PPORT_VIEW ClientView
,
79 _Inout_opt_ PREMOTE_PORT_VIEW ServerView
,
80 _Out_opt_ PULONG MaxMessageLength
,
81 _Inout_opt_ PVOID ConnectionInformation
,
82 _Inout_opt_ PULONG ConnectionInformationLength
89 _Out_ PHANDLE PortHandle
,
90 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
91 _In_ ULONG MaxConnectionInfoLength
,
92 _In_ ULONG MaxMessageLength
,
93 _In_ ULONG MaxPoolUsage
100 _Out_ PHANDLE PortHandle
,
101 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
102 _In_ ULONG MaxConnectInfoLength
,
103 _In_ ULONG MaxDataLength
,
104 _In_opt_ ULONG NPMessageQueueSize
110 NtImpersonateClientOfPort(
111 _In_ HANDLE PortHandle
,
112 _In_ PPORT_MESSAGE ClientMessage
119 _In_ HANDLE PortHandle
,
120 _In_ PPORT_MESSAGE ConnectionRequest
126 NtQueryInformationPort(
127 _In_ HANDLE PortHandle
,
128 _In_ PORT_INFORMATION_CLASS PortInformationClass
,
129 _Out_bytecap_(PortInformationLength
) PVOID PortInformation
,
130 _In_ ULONG PortInformationLength
,
131 _Out_ PULONG ReturnLength
136 NtQueryPortInformationProcess(
144 _In_ HANDLE PortHandle
,
145 _In_ PPORT_MESSAGE Message
,
147 _Out_bytecap_(BufferLength
) PVOID Buffer
,
148 _In_ ULONG BufferLength
,
149 _Out_ PULONG ReturnLength
156 _In_ HANDLE PortHandle
,
157 _In_ PPORT_MESSAGE LpcReply
163 NtReplyWaitReceivePort(
164 _In_ HANDLE PortHandle
,
165 _Out_opt_ PVOID
*PortContext
,
166 _In_opt_ PPORT_MESSAGE ReplyMessage
,
167 _Out_ PPORT_MESSAGE ReceiveMessage
173 NtReplyWaitReceivePortEx(
174 _In_ HANDLE PortHandle
,
175 _Out_opt_ PVOID
*PortContext
,
176 _In_opt_ PPORT_MESSAGE ReplyMessage
,
177 _Out_ PPORT_MESSAGE ReceiveMessage
,
178 _In_opt_ PLARGE_INTEGER Timeout
184 NtReplyWaitReplyPort(
185 _In_ HANDLE PortHandle
,
186 _Out_ PPORT_MESSAGE ReplyMessage
193 _In_ HANDLE PortHandle
,
194 _In_ PPORT_MESSAGE LpcMessage
200 NtRequestWaitReplyPort(
201 _In_ HANDLE PortHandle
,
202 _Out_ PPORT_MESSAGE LpcReply
,
203 _In_ PPORT_MESSAGE LpcRequest
210 _Out_ PHANDLE PortHandle
,
211 _In_ PUNICODE_STRING PortName
,
212 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos
,
213 _Inout_opt_ PPORT_VIEW ClientView
,
214 _In_opt_ PSID ServerSid
,
215 _Inout_opt_ PREMOTE_PORT_VIEW ServerView
,
216 _Out_opt_ PULONG MaxMessageLength
,
217 _Inout_opt_ PVOID ConnectionInformation
,
218 _Inout_opt_ PULONG ConnectionInformationLength
225 _In_ HANDLE PortHandle
,
226 _In_ PPORT_MESSAGE Message
,
228 _In_bytecount_(BufferLength
) PVOID Buffer
,
229 _In_ ULONG BufferLength
,
230 _Out_ PULONG ReturnLength
237 _Out_ PHANDLE PortHandle
,
238 _In_opt_ PVOID PortContext
,
239 _In_ PPORT_MESSAGE ConnectionRequest
,
240 _In_ BOOLEAN AcceptConnection
,
241 _In_opt_ PPORT_VIEW ServerView
,
242 _In_opt_ PREMOTE_PORT_VIEW ClientView
248 ZwCompleteConnectPort(
249 _In_ HANDLE PortHandle
256 _Out_ PHANDLE PortHandle
,
257 _In_ PUNICODE_STRING PortName
,
258 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos
,
259 _In_opt_ PPORT_VIEW ClientView
,
260 _In_opt_ PREMOTE_PORT_VIEW ServerView
,
261 _In_opt_ PULONG MaxMessageLength
,
262 _In_opt_ PVOID ConnectionInformation
,
263 _In_opt_ PULONG ConnectionInformationLength
270 _Out_ PHANDLE PortHandle
,
271 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
272 _In_ ULONG MaxConnectionInfoLength
,
273 _In_ ULONG MaxMessageLength
,
274 _In_ ULONG MaxPoolUsage
280 ZwCreateWaitablePort(
281 _Out_ PHANDLE PortHandle
,
282 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
283 _In_ ULONG MaxConnectInfoLength
,
284 _In_ ULONG MaxDataLength
,
285 _In_opt_ ULONG NPMessageQueueSize
291 ZwImpersonateClientOfPort(
292 _In_ HANDLE PortHandle
,
293 _In_ PPORT_MESSAGE ClientMessage
300 _In_ HANDLE PortHandle
,
301 _In_ PPORT_MESSAGE ConnectionRequest
307 ZwQueryInformationPort(
308 _In_ HANDLE PortHandle
,
309 _In_ PORT_INFORMATION_CLASS PortInformationClass
,
310 _Out_bytecap_(PortInformationLength
) PVOID PortInformation
,
311 _In_ ULONG PortInformationLength
,
312 _Out_ PULONG ReturnLength
319 _In_ HANDLE PortHandle
,
320 _In_ PPORT_MESSAGE Message
,
322 _Out_bytecap_(BufferLength
) PVOID Buffer
,
323 _In_ ULONG BufferLength
,
324 _Out_ PULONG ReturnLength
331 _In_ HANDLE PortHandle
,
332 _In_ PPORT_MESSAGE LpcReply
338 ZwReplyWaitReceivePort(
339 _In_ HANDLE PortHandle
,
340 _Out_opt_ PVOID
*PortContext
,
341 _In_opt_ PPORT_MESSAGE ReplyMessage
,
342 _Out_ PPORT_MESSAGE ReceiveMessage
348 ZwReplyWaitReceivePortEx(
349 _In_ HANDLE PortHandle
,
350 _Out_opt_ PVOID
*PortContext
,
351 _In_opt_ PPORT_MESSAGE ReplyMessage
,
352 _Out_ PPORT_MESSAGE ReceiveMessage
,
353 _In_opt_ PLARGE_INTEGER Timeout
359 ZwReplyWaitReplyPort(
360 _In_ HANDLE PortHandle
,
361 _Out_ PPORT_MESSAGE ReplyMessage
368 _In_ HANDLE PortHandle
,
369 _In_ PPORT_MESSAGE LpcMessage
375 ZwRequestWaitReplyPort(
376 _In_ HANDLE PortHandle
,
377 _Out_ PPORT_MESSAGE LpcReply
,
378 _In_ PPORT_MESSAGE LpcRequest
385 _Out_ PHANDLE PortHandle
,
386 _In_ PUNICODE_STRING PortName
,
387 _In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos
,
388 _Inout_opt_ PPORT_VIEW ClientView
,
390 _Inout_opt_ PREMOTE_PORT_VIEW ServerView
,
391 _Out_opt_ PULONG MaxMessageLength
,
392 _Inout_opt_ PVOID ConnectionInformation
,
393 _Inout_opt_ PULONG ConnectionInformationLength
400 _In_ HANDLE PortHandle
,
401 _In_ PPORT_MESSAGE Message
,
403 _In_bytecount_(BufferLength
) PVOID Buffer
,
404 _In_ ULONG BufferLength
,
405 _Out_ PULONG ReturnLength