/// <summary> /// Macro for initializing the message header /// </summary> /// <param name="ph"></param> /// <param name="l"></param> /// <param name="t"></param> public static void InitializeMessageHeader(ref PORT_MESSAGE ph, ushort l, PORT_MESSAGE_TYPES t) { (ph).u1.s1.TotalLength = (ushort)(l); unsafe { (ph).u1.s1.DataLength = (ushort)(l - sizeof(PORT_MESSAGE)); } (ph).u2.s2.Types = t; (ph).u2.s2.DataInfoOffset = 0; }
public static extern int NtListenPort(AlpcPortHandle PortHandle, ref PORT_MESSAGE RequestMessage);
public static extern int NtAcceptConnectPort(out AlpcPortHandle PortHandle, IntPtr PortContext, ref PORT_MESSAGE ConnectionRequest, bool AcceptConnection, IntPtr /*out PORT_VIEW*/ ServerView, IntPtr /*out REMOTE_PORT_VIEW*/ ClientView);
NtReplyWaitReceivePort( AlpcPortHandle PortHandle, out IntPtr PortContext, ref PORT_MESSAGE ReplyMessage, out PORT_MESSAGE ReceiveMessage );
NtReplyWaitReplyPort( AlpcPortHandle PortHandle, out PORT_MESSAGE ReplyMessage );
NtReplyPort( AlpcPortHandle PortHandle, ref PORT_MESSAGE ReplyMessage );
NtRequestWaitReplyPort( AlpcPortHandle PortHandle, ref PORT_MESSAGE RequestMessage, out PORT_MESSAGE ReplyMessage );
NtRequestPort( AlpcPortHandle PortHandle, ref PORT_MESSAGE RequestMessage );