Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: lpcsvr.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 12-12-97 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __LPCSVR_H__
  18. #define __LPCSVR_H__
  19. struct _LPCSVR_MESSAGE ;
  20. typedef struct _LPCSVR_SERVER {
  21. LARGE_INTEGER Timeout ; // Default Timeout
  22. RTL_CRITICAL_SECTION Lock ; // Lock
  23. LPCSVR_INITIALIZE Init ; // Callback functions
  24. LIST_ENTRY ContextList ; // List of active contexts
  25. ULONG ContextCount ; // Count of contexts
  26. HANDLE Port ; // Server Port
  27. HANDLE WaitHandle ; // Thread pool handle
  28. ULONG Flags ; // Flags (below)
  29. ULONG MessageSize ; // Size for a message
  30. struct _LPCSVR_MESSAGE * MessagePool ; // List of message buffers
  31. ULONG MessagePoolSize ; // Number of messages
  32. ULONG MessagePoolLimit ; // max # messages
  33. ULONG ReceiveThreads ; // Number of threads with Recieve pending
  34. HANDLE ShutdownEvent ; // Event to signal during shutdown
  35. } LPCSVR_SERVER, * PLPCSVR_SERVER ;
  36. #define LPCSVR_WAITABLE 0x00000001
  37. #define LPCSVR_SHUTDOWN_PENDING 0x00000002
  38. #define LPCSVR_SYNCHRONOUS 0x00000004
  39. typedef struct _LPCSVR_CONTEXT {
  40. LIST_ENTRY List ;
  41. PLPCSVR_SERVER Server ;
  42. HANDLE CommPort ;
  43. LONG RefCount ;
  44. UCHAR PrivateContext[ 4 ];
  45. } LPCSVR_CONTEXT, * PLPCSVR_CONTEXT ;
  46. typedef struct _LPCSVR_MESSAGE {
  47. union {
  48. struct _LPCSVR_MESSAGE * Next ;
  49. struct _LPCSVR_CONTEXT * Context ;
  50. } Header ;
  51. PORT_MESSAGE Message ;
  52. } LPCSVR_MESSAGE, * PLPCSVR_MESSAGE ;
  53. #endif