test: lpcsvr.h Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# lpcsvr.h

Go to the documentation of this file.

    00001 //+---------------------------------------------------------------------------
    00002 //
    00003 //  Microsoft Windows
    00004 //  Copyright (C) Microsoft Corporation, 1992 - 1997.
    00005 //
    00006 //  File:       lpcsvr.h
    00007 //
    00008 //  Contents:
    00009 //
    00010 //  Classes:
    00011 //
    00012 //  Functions:
    00013 //
    00014 //  History:    12-12-97   RichardW   Created
    00015 //
    00016 //----------------------------------------------------------------------------
    00017
    00018 #ifndef __LPCSVR_H__
    00019 #define __LPCSVR_H__
    00020
    00021 struct _LPCSVR_MESSAGE ;
    00022
    00023 typedef struct _LPCSVR_SERVER {
    00024     LARGE_INTEGER Timeout ;         // Default Timeout
    00025     RTL_CRITICAL_SECTION Lock ;     // Lock
    00026     LPCSVR_INITIALIZE Init ;        // Callback functions
    00027     LIST_ENTRY ContextList ;        // List of active contexts
    00028     ULONG ContextCount ;            // Count of contexts
    00029     HANDLE Port ;                   // Server Port
    00030     HANDLE WaitHandle ;             // Thread pool handle
    00031     ULONG Flags ;                   // Flags (below)
    00032     ULONG MessageSize ;             // Size for a message
    00033     struct _LPCSVR_MESSAGE * MessagePool ; // List of message buffers
    00034     ULONG MessagePoolSize ;         // Number of messages
    00035     ULONG MessagePoolLimit ;        // max # messages
    00036     ULONG ReceiveThreads ;          // Number of threads with Recieve pending
    00037     HANDLE ShutdownEvent ;          // Event to signal during shutdown
    00038 } LPCSVR_SERVER, * PLPCSVR_SERVER ;
    00039
    00040 #define LPCSVR_WAITABLE         0x00000001
    00041 #define LPCSVR_SHUTDOWN_PENDING 0x00000002
    00042 #define LPCSVR_SYNCHRONOUS      0x00000004
    00043
    00044
    00045 typedef struct _LPCSVR_CONTEXT {
    00046     LIST_ENTRY List ;
    00047     PLPCSVR_SERVER Server ;
    00048     HANDLE CommPort ;
    00049     LONG RefCount ;
    00050     UCHAR PrivateContext[ 4 ];
    00051 } LPCSVR_CONTEXT, * PLPCSVR_CONTEXT ;
    00052
    00053 typedef struct _LPCSVR_MESSAGE {
    00054     union {
    00055         struct _LPCSVR_MESSAGE * Next ;
    00056         struct _LPCSVR_CONTEXT * Context ;
    00057     } Header ;
    00058
    00059     PORT_MESSAGE Message ;
    00060
    00061 } LPCSVR_MESSAGE, * PLPCSVR_MESSAGE ;
    00062
    00063
    00064
    00065 #endif