From 775cd422dff73ec9fcd8af26e77f29f9a5206754 Mon Sep 17 00:00:00 2001 From: wj32 Date: Sun, 7 Nov 2010 01:27:46 +0000 Subject: [PATCH] updated ALPC definitions git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3831 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- 2.x/trunk/phlib/include/ntexapi.h | 12 +++--------- 2.x/trunk/phlib/include/ntioapi.h | 9 +++++++++ 2.x/trunk/phlib/include/ntlpcapi.h | 7 +++++-- 2.x/trunk/phlib/include/nttp.h | 8 +++----- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/2.x/trunk/phlib/include/ntexapi.h b/2.x/trunk/phlib/include/ntexapi.h index b8f2941d6..7ef1d487e 100644 --- a/2.x/trunk/phlib/include/ntexapi.h +++ b/2.x/trunk/phlib/include/ntexapi.h @@ -572,14 +572,6 @@ typedef struct _WORKER_FACTORY_BASIC_INFORMATION NTSTATUS CreateThreadStatus; } WORKER_FACTORY_BASIC_INFORMATION, *PWORKER_FACTORY_BASIC_INFORMATION; -typedef struct _IO_COMPLETION_MINIPACKET -{ - PVOID KeyContext; - PVOID ApcContext; - NTSTATUS IoStatus; - ULONG_PTR IoStatusInformation; -} IO_COMPLETION_MINIPACKET, *PIO_COMPLETION_MINIPACKET; - #if (PHNT_VERSION >= PHNT_VISTA) NTSYSCALLAPI @@ -641,12 +633,14 @@ NtWorkerFactoryWorkerReady( __in HANDLE WorkerFactoryHandle ); +struct _IO_COMPLETION_MINIPACKET; + NTSYSCALLAPI NTSTATUS NTAPI NtWaitForWorkViaWorkerFactory( __in HANDLE WorkerFactoryHandle, - __out PIO_COMPLETION_MINIPACKET MiniPacket + __out struct _IO_COMPLETION_MINIPACKET *MiniPacket ); #endif diff --git a/2.x/trunk/phlib/include/ntioapi.h b/2.x/trunk/phlib/include/ntioapi.h index d83b67849..8f724c09a 100644 --- a/2.x/trunk/phlib/include/ntioapi.h +++ b/2.x/trunk/phlib/include/ntioapi.h @@ -155,6 +155,15 @@ typedef VOID (NTAPI *PIO_APC_ROUTINE)( __in ULONG Reserved ); +// rev +// Used for worker factory objects +typedef struct _IO_COMPLETION_MINIPACKET +{ + PVOID KeyContext; + PVOID ApcContext; + IO_STATUS_BLOCK Iosb; +} IO_COMPLETION_MINIPACKET, *PIO_COMPLETION_MINIPACKET; + typedef enum _FILE_INFORMATION_CLASS { FileDirectoryInformation = 1, diff --git a/2.x/trunk/phlib/include/ntlpcapi.h b/2.x/trunk/phlib/include/ntlpcapi.h index d0168d038..31c4f3064 100644 --- a/2.x/trunk/phlib/include/ntlpcapi.h +++ b/2.x/trunk/phlib/include/ntlpcapi.h @@ -62,7 +62,9 @@ typedef struct _PORT_DATA_INFORMATION #define LPC_ERROR_EVENT 9 #define LPC_CONNECTION_REQUEST 10 -#define LPC_KERNELMODE_MESSAGE (CSHORT)0x8000 +#define LPC_KERNELMODE_MESSAGE (CSHORT)0x8000 +#define LPC_NO_IMPERSONATE (CSHORT)0x4000 + #define PORT_VALID_OBJECT_ATTRIBUTES OBJ_CASE_INSENSITIVE #ifdef _M_IX86 @@ -295,6 +297,7 @@ NtQueryInformationPort( // it seems traditional to use a typedef in these cases. typedef PVOID ALPC_HANDLE, *PALPC_HANDLE; +#define ALPC_PORFLG_ALLOW_LPC_REQUESTS 0x20000 #define ALPC_PORFLG_WAITABLE_PORT 0x40000 // dbg #define ALPC_PORFLG_SYSTEM_PROCESS 0x100000 // dbg @@ -679,7 +682,7 @@ NtAlpcAcceptConnectPort( __in POBJECT_ATTRIBUTES ObjectAttributes, __in PALPC_PORT_ATTRIBUTES PortAttributes, __in_opt PVOID PortContext, - __in PPORT_MESSAGE RequestMessage, + __in PPORT_MESSAGE ConnectMessage, __inout_opt PALPC_MESSAGE_ATTRIBUTES ReplyMessageAttributes, __in BOOLEAN AcceptConnection ); diff --git a/2.x/trunk/phlib/include/nttp.h b/2.x/trunk/phlib/include/nttp.h index 1e1567eb7..f88fedee9 100644 --- a/2.x/trunk/phlib/include/nttp.h +++ b/2.x/trunk/phlib/include/nttp.h @@ -5,19 +5,17 @@ typedef struct _TP_ALPC TP_ALPC, *PTP_ALPC; -// unsure typedef VOID (NTAPI *PTP_ALPC_CALLBACK)( __inout PTP_CALLBACK_INSTANCE Instance, __inout_opt PVOID Context, - __in PTP_ALPC Alpc // ? + __in PTP_ALPC Alpc ); -// unsure typedef VOID (NTAPI *PTP_ALPC_CALLBACK_EX)( __inout PTP_CALLBACK_INSTANCE Instance, __inout_opt PVOID Context, - __in PTP_ALPC Alpc, // ? - __in PTP_WAIT Wait // ? + __in PTP_ALPC Alpc, + __in PVOID ApcContext ); // end_rev