home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / security / crypto / cfiler / globals.h < prev    next >
C/C++ Source or Header  |  1997-10-13  |  6KB  |  213 lines

  1. // GLOBALS.H
  2.  
  3. #ifndef GLOBALS_INCLUDED
  4. #define GLOBALS_INCLUDED
  5.  
  6. #include "TABLE.H"
  7.  
  8. #define DEBUGMSGS
  9. #define DEBUGGING
  10. #define NOSTRICT
  11. #define BUF_SIZE 1000
  12. #define PATH_SIZE 600
  13. #define HEADER_SIZE 256
  14. #define SHA_SIZE 20
  15. #define RANDOM_NAME_LENGTH 8
  16. #define    EXPORTER
  17. #define    ENCRYPT_DECRYPT 1
  18. #define    SIGN            2
  19. #define    VERIFY            3
  20. #define MAXBLOBLEN        200
  21.  
  22. //
  23. // Accellerator IDs
  24. //
  25. #define ACCEL_ID        1001
  26.  
  27. //
  28. // Icon IDs
  29. //
  30. #define UI_CRYPTFILERICON    2001
  31.  
  32. //
  33. // DialogBox Control IDs
  34. //
  35. #define SB_OK           3001
  36. #define SB_CANCEL       3002
  37. #define SB_ACTION       3003
  38. #define SB_TOFROM       3004
  39. #define SB_SOURCE       3005
  40. #define SB_DEST         3006
  41. #define SB_STATIC       3007
  42. #define SB_KEY          3008
  43. #define SB_VALUE        3009
  44. #define SB_SCROLL       3010
  45.  
  46. //
  47. // String Table IDs
  48. //
  49. #define STR_EXE         4001
  50. #define STR_COM         4002
  51. #define STR_CMD         4003
  52. #define STR_BAT         4004
  53.  
  54. #define STR_DEF_EDITOR  4101
  55.  
  56. //
  57. // Bitmap IDs
  58. //
  59. #define UB_BMP_MARKER   5001    // This should be the same as the first bitmap.
  60. #define UB_FLOPPY1      5001    // THESE BITMAP IDs MUST BE CONTIGUOUS AND
  61. #define UB_FLOPPY2      5002    //   IN THIS ORDER!  For 'ease of loading'.
  62. #define UB_REMOTE1      5003
  63. #define UB_REMOTE2      5004
  64. #define UB_CD1          5005
  65. #define UB_CD2          5006
  66. #define UB_FIXED1       5007
  67. #define UB_FIXED2       5008
  68.  
  69. //
  70. // Command line window and Drv-CHILD child window IDs
  71. //
  72. #define COMMAND_ID      6001    // Command Line Window
  73. #define TEXT_WINDOW_ID  6002    // Title Bar
  74. #define LISTDIR_ID      6003    // Directory ListBox
  75. #define LISTFILE_ID     6004    // File ListBox
  76.  
  77. //
  78. // Internal Main window IDs
  79. //
  80. #define MM_FILLDIR      7001
  81. #define MM_FILLFILE     7002
  82.  
  83. //
  84. // Menu ID's, VKEYs, & other WM_COMMAND messages
  85. //
  86. #define MM_COPY         8002
  87. #define MM_DELETE       8003
  88. #define MM_MOVE         8004
  89. #define MM_RENAME       8005
  90. #define MM_MKDIR        8006
  91. #define MM_DELDIR       8007
  92. #define MM_VERSION      8008
  93. #define MM_EXIT         8009
  94.  
  95. #define MM_REFRESH      8101
  96. #define MM_ACTIVEDRV    8102
  97. #define MM_TAB          8103
  98. #define MM_SWAP         8104
  99. #define MM_ORIENT       8105
  100. #define MM_EXPAND       8106
  101. #define MM_KEEPCMD      8107
  102.  
  103. #define MM_ESCAPE       8112
  104. #define MM_TOGGLE       8113
  105.  
  106. #define MM_ABOUT        8201
  107.  
  108. #define MM_DRIVE_NUM    8301       // ...Through 8226, one for each drive letter
  109.                     //   .
  110.                     //   .
  111.                     //  8326
  112.  
  113.  
  114. //
  115. // constants
  116. //
  117. #define MAIN_WIDTH          605    // Default width and height of main window
  118. #define MAIN_HEIGHT         400
  119.  
  120. #define DRIVE_BITMAP_WIDTH  23     // Width and height of drive toolbar bitmaps
  121. #define DRIVE_BITMAP_HEIGHT 14     //   assoc. w/ bitmap IDs above.
  122. #define DRIVE_LETTER_SPACING 2     // Space between drv bmp and drv letter label
  123. #define DRIVE_BITMAP_SPACING 6     // Space on either side of drv bitmap-labels
  124. #define NUM_BITMAPS          8     // # types of Drive Bitmaps to be loaded.
  125.  
  126. #define DIRECTORY_STRING_SIZE MAX_PATH  // Size of max allowable direcory path
  127.  
  128. #define LIST_BORDER         2      // Space between listbox and Drv child frame
  129.  
  130. #define DRIVE_MENU_NUM      2      // This is the 'Drives' submenu
  131.  
  132. #define LISTBOX_TAB_SIZE    8      // Size of the tabs in the Drv child LBs
  133.  
  134. #define OVER_UNDER          0      // Relative positions of Drv children
  135. #define SIDE_BY_SIDE        1
  136.  
  137. #define BOLD_FONT           700    // GetDeviceCaps sez this value is for bold
  138.                                    //   in the lfWeight LOGFONT member
  139.  
  140. #define NUM_EXTENSION_STRINGS   4  // Lists number of file ext. in stringtable
  141. #define EXTENSION_LENGTH        5  // Tot. number of characters in extension,
  142.                                    //  including '\0' char.
  143.  
  144. #define FILE_SYSTEM_STRING_SIZE         20      // Must be >= 8
  145.  
  146. #define NUM_POSSIBLE_REMOVABLE_DRIVES   26      // A-Z
  147.  
  148. #define MUTEX_TIMEOUT       50     // LB Mutex timeout in milliseconds
  149.  
  150.  
  151. // The following are used in the .EXE Version retrieval code in DRVPROC.C
  152. #define NUM_VERSION_INFO_KEYS    12     // See FilerGetVersion()
  153. #define VERSION_DLG_LB_HEIGHT    10     // height in text lines of version dlg LBs
  154.  
  155. #define VERSION_INFO_KEY_ROOT    TEXT("\\StringFileInfo\\")
  156. #define VERSION_INFO_LANG_ID     TEXT("040904B0")
  157. // end .EXE Version code constants
  158.  
  159.  
  160. //
  161. // Drive enumeration strucure
  162. //
  163. typedef struct _PerDriveInfo {
  164.     TCHAR   DriveLetter;
  165.     LPTSTR  DriveName;
  166.     UINT    DriveType;
  167.     struct _PerDriveInfo *next;
  168. } DRVINFO, *LPDINFO;
  169.  
  170. //
  171. // Instance data for each Drv child window
  172. //
  173. typedef struct _PerWndInfo {
  174.     HWND    hwnd;                       // Handle to Drive child window
  175.     HWND    hParent;                    // Handle to Filer main window
  176.     HWND    hTextWnd;                   // Handle to Drive child Title Bar
  177.     HWND    hFileLB;                    // Handle to Drv child File LB
  178.     HWND    hDirLB;                     // Handle to Drv child Dir LB
  179.     HANDLE  hDirThread;                 // Handle to ExpDir or FullExpand thread
  180.     HANDLE  hDirMutex;                  // Protects Dir LB from mult. access
  181.     HANDLE  hFileMutex;                 // Protects File LB from mult. access
  182.     BOOL    fDirLeft;                   // Flag: the Dir LB is on left
  183.     BOOL    fDirExpand;                 // Flag: the Dir LB is fully expanded
  184.     BOOL    fSuicide;                   // Flag: kills ExpDir/FullExpand thread
  185.     BOOL    fEscape;                    // Flag: User aborted Expand thread
  186.     LPDINFO lpDriveInfo;                // pointer to current _PerDriveInfo
  187.     TCHAR   CaptionBarText[BUF_SIZE];     // Drv Child Title text
  188.     TABLE    DirTable;
  189.     TABLE    FileTable;
  190. } DRVCHILDINFO, *LPCINFO;
  191.  
  192. typedef struct _PerButtonInfo {
  193.     HANDLE          hButton;
  194.     BOOL            fButtonDown;
  195.     LPDINFO         lpDrive;
  196.     struct _PerButtonInfo  *next;
  197. }   BINFO, *LPBINFO;
  198.  
  199. typedef struct _SelectDlgInfo {
  200.     HWND    hwnd;
  201.     DWORD   dwAction;
  202.     LPTSTR  szAction;
  203.     LPTSTR  szToFrom;
  204. } SELECTINFO, *LPSINFO;
  205.  
  206. //  .EXE version information key structure: for FilerGetVersion() in DRVPROC.C
  207. typedef struct _VersionKeyInfo {
  208.     TCHAR const *szKey;
  209.     TCHAR       *szValue;
  210. } VKINFO, *LPVKINFO;
  211.  
  212. #endif
  213.