home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / ipc / namepipe / npserver / server32.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.7 KB  |  57 lines

  1.  
  2. /******************************************************************************\
  3. *       This is a part of the Microsoft Source Code Samples. 
  4. *       Copyright (C) 1993-1997 Microsoft Corporation.
  5. *       All rights reserved. 
  6. *       This source code is only intended as a supplement to 
  7. *       Microsoft Development Tools and/or WinHelp documentation.
  8. *       See these sources for detailed information regarding the 
  9. *       Microsoft samples programs.
  10. \******************************************************************************/
  11.  
  12. #define MAX_PIPE_INSTANCES 100
  13.  
  14. #define LINE_LEN   80
  15. #define NAME_SIZE  25
  16.  
  17. // Bitmaps and coordinates.
  18. #define END_LIVE   1
  19. #define END_DEAD   2
  20. #define MID_LIVE   3
  21. #define MID_DEAD   4
  22. #define BITMAP_X   20
  23. #define BITMAP_Y   32
  24. #define NAME_X     60
  25. #define NAME_Y     10
  26.  
  27. // Buffers and pipe symbolic constants.
  28. #define IN_BUF_SIZE        1000
  29. #define OUT_BUF_SIZE       1000
  30. #define TIME_OUT           0
  31. #define PLEASE_READ        1000
  32. #define PLEASE_WRITE       1000
  33.  
  34. //Stringtable identifiers
  35. #define    IDS_WRONGOS     100
  36. #define IDS_WINDOWTITLE 101
  37. #define IDS_ERRORCODE   102
  38. #define IDS_DEBUGTITLE  103
  39. #define IDS_READERROR   104
  40. #define IDS_DEBUGINFO   105
  41. #define IDS_DEBUGLAST   106
  42.  
  43. // Structure used to hold information about a pipe client.
  44. // They're used as array elements.
  45. typedef struct { HANDLE     hPipe;
  46.                  HANDLE     hEvent;
  47.                  OVERLAPPED overLap;
  48.                  BOOL       live;
  49.                  CHAR Name[NAME_SIZE];
  50.                } WRTHANDLE;
  51.  
  52.  
  53. LONG CALLBACK MainWndProc (HWND, UINT, WPARAM, LPARAM);
  54. VOID          ServerProc (HWND *);
  55. VOID          TellAll    (CHAR *);
  56. VOID          DrawBranch(HDC);
  57.