home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / memory / memory.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  3KB  |  102 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.  
  13. #include <windows.h>
  14. #include <string.h>
  15.  
  16. /*
  17.  * Resource defines
  18.  */
  19. #define WINDOWMENU  1
  20.  
  21. #ifdef RC_INVOKED
  22. #define ID(id) id
  23. #else
  24. #define ID(id) MAKEINTRESOURCE(id)
  25. #endif
  26.  
  27. /*
  28.  * Menu ID's
  29.  */
  30. #define MM_ABOUT        8000
  31. #define MM_SERVER       8001
  32. #define MM_CLIENT       8002
  33. #define MM_RESERVE      8003
  34.  
  35. #define MM_OPT_1        7001
  36. #define MM_OPT_2        7002
  37. #define MM_OPT_3        7003
  38. #define MM_OPT_4        7004
  39. #define MM_OPT_5        7005
  40. #define MM_OPT_6        7006
  41. #define MM_OPT_7        7007
  42. #define MM_OPT_8        7008
  43.  
  44. #define IDM_CASCADE     30
  45. #define IDM_TILE        31
  46. #define IDM_ARRANGE     32
  47. #define IDM_CLOSEALL    33
  48.  
  49. #define SIZEOFCAPTIONTEXT       20
  50.  
  51. /*
  52.  * Dialog ID's
  53.  */
  54. #define IDBTN_PAGE              101
  55. #define IDBTN_MAP               102
  56. #define IDBTN_OK                103
  57.  
  58. #define IDEDIT_MAPFILE          104
  59. #define IDEDIT_MAPNAME          105
  60.  
  61.  
  62. /*
  63.  * String resource ID's
  64.  */
  65.  
  66. #define  IDS_ERR_INITAPP_FAILED         300
  67. #define  IDS_ERR_CREATE_CHILD_FAILED    301
  68. #define  IDS_ERR_CREATE_DLG_FAILED      302
  69. #define  IDS_ERR_MAPFILE_FAILED         303
  70. #define  IDS_ERR_MAPPING_FAILED         304
  71. #define  IDS_ERR_MAPVIEW_FAILED         305
  72. #define  IDS_ERR_ACCESS_WRITE_FAILED    306
  73. #define  IDS_ERR_ACCESS_READ_FAILED     307
  74. #define  IDS_ERR_OPEN_MAPPING_FAILED    308
  75. #define  IDS_SERVER                     309
  76. #define  IDS_CLIENT                     310
  77. #define  IDS_CREATE_MAP_FILE            311
  78. #define  IDS_CREATE_MAPPING             312
  79. #define  IDS_MAPPING_VIEW               313
  80. #define  IDS_ACCESSING_SERVER_WRITE     314
  81. #define  IDS_OPENING_FILE               315
  82. #define  IDS_ACCESSING_SERVER_READ      316
  83. #define  IDS_SEL_CREATE_FILE_MAPPING    317
  84. #define  IDS_SEL_MAP_VIEW               318
  85. #define  IDS_SEL_ACCESS                 319
  86. #define  IDS_SEL_CREATE_FILE            320
  87. #define  IDS_SEL_ACCESS_READ            321
  88. #define  IDS_SEL_OPEN_FILE              322
  89. #define  IDS_ERROR                      323
  90.  
  91.  
  92. extern HWND ghwndClient;
  93. extern HWND ghwndMain;
  94.  
  95.  
  96. LPTSTR GetStringRes(int id);
  97. void ErrorOut(LPSTR errstring);
  98. HANDLE CreateMapFile (char *MapFileName);
  99. HANDLE CreateMap (HANDLE FileToBeMapped, LPSTR MapName);
  100. LPVOID MapView (HANDLE hMap);
  101. HANDLE OpenMap(LPSTR MapName);
  102.