typedef struct _ALPC_PORT
{
    LIST_ENTRY PortListEntry;
    ALPC_COMMUNICATION_INFO *CommunicationInfo;
    EPROCESS *OwnerProcess;
    void *CompletionPort;
    void *CompletionKey;
    ALPC_COMPLETION_PACKET_LOOKASIDE *CompletionPacketLookaside;
    void *PortContext;
    SECURITY_CLIENT_CONTEXT StaticSecurity;
    LIST_ENTRY MainQueue;
    LIST_ENTRY PendingQueue;
    LIST_ENTRY LargeMessageQueue;
    LIST_ENTRY WaitQueue;
    union
    {
        KSEMAPHORE *Semaphore;
        KEVENT *DummyEvent;
    };
    ALPC_PORT_ATTRIBUTES PortAttributes;
    EX_PUSH_LOCK Lock;
    EX_PUSH_LOCK ResourceListLock;
    LIST_ENTRY ResourceListHead;
    ALPC_COMPLETION_LIST *CompletionList;
    ALPC_MESSAGE_ZONE *MessageZone;
    CALLBACK_OBJECT *CallbackObject;
    void *CallbackContext;
    LIST_ENTRY CanceledQueue;
    volatile long SequenceNo;
    union
    {
        struct
        {
            unsigned long Initialized : 1;
            unsigned long Type : 2;
            unsigned long ConnectionPending : 1;
            unsigned long ConnectionRefused : 1;
            unsigned long Disconnected : 1;
            unsigned long Closed : 1;
            unsigned long NoFlushOnClose : 1;
            unsigned long ReturnExtendedInfo : 1;
            unsigned long Waitable : 1;
            unsigned long DynamicSecurity : 1;
            unsigned long Wow64CompletionList : 1;
            unsigned long Lpc : 1;
            unsigned long LpcToLpc : 1;
            unsigned long HasCompletionList : 1;
            unsigned long HadCompletionList : 1;
            unsigned long EnableCompletionList : 1;
        } s1;
        unsigned long State;
    } u1;
    ALPC_PORT *TargetQueuePort;
    ALPC_PORT *TargetSequencePort;
    KALPC_MESSAGE *CachedMessage;
    unsigned long MainQueueLength;
    unsigned long PendingQueueLength;
    unsigned long LargeMessageQueueLength;
    unsigned long CanceledQueueLength;
    unsigned long WaitQueueLength;
} ALPC_PORT, *PALPC_PORT;