Leaked source code of windows server 2003
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.

127 lines
3.3 KiB

  1. /*
  2. **------------------------------------------------------------------------------
  3. ** Module: Disk Cleanup Manager
  4. ** File: common.h
  5. **
  6. ** Purpose: various common stuff for this module
  7. ** Notes:
  8. ** Mod Log: Created by Jason Cobb (2/97)
  9. **
  10. ** Copyright (c)1997 Microsoft Corporation, All Rights Reserved
  11. **------------------------------------------------------------------------------
  12. */
  13. #ifndef COMMON_H
  14. #define COMMON_H
  15. /*
  16. **------------------------------------------------------------------------------
  17. ** Microsoft C++ include files
  18. **------------------------------------------------------------------------------
  19. */
  20. #ifndef STRICT
  21. #define STRICT
  22. #endif
  23. #define INC_OLE2 // WIN32, get ole2 from windows.h
  24. #include <windows.h>
  25. #include <windowsx.h>
  26. #include <shlobj.h>
  27. #include <shlobjp.h>
  28. #include <shlwapi.h>
  29. #include <shlwapip.h>
  30. #include <initguid.h>
  31. #include <regstr.h>
  32. #include <strsafe.h>
  33. #include "resource.h"
  34. #include "cmstrings.h"
  35. #include "ids.h"
  36. #ifdef _DEBUG
  37. #define DEBUG
  38. #endif
  39. #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  40. #define FLAG_SAGESET 0x00000001
  41. #define FLAG_SAGERUN 0x00000002
  42. #define FLAG_TUNEUP 0x00000004
  43. #define FLAG_LOWDISK 0x00000008
  44. #define FLAG_VERYLOWDISK 0x00000010
  45. #define FLAG_SETUP 0x00000020
  46. #define FLAG_SAVE_STATE 0x80000000
  47. #define STATE_SELECTED 0x00000001
  48. #define STATE_SAGE_SELECTED 0x00000002
  49. #define RETURN_SUCCESS 0x00000001
  50. #define RETURN_CLEANER_FAILED 0x00000002
  51. #define RETURN_USER_CANCELED_SCAN 0x00000003
  52. #define RETURN_USER_CANCELED_PURGE 0x00000004
  53. #ifdef NEC_98
  54. #define SZ_DEFAULT_DRIVE TEXT("A:\\")
  55. #else
  56. #define SZ_DEFAULT_DRIVE TEXT("C:\\")
  57. #endif
  58. #define SZ_CLASSNAME TEXT("CLEANMGR")
  59. #define SZ_STATE TEXT("StateFlags")
  60. #define SZ_DEFAULTICONPATH TEXT("CLSID\\%s\\DefaultIcon")
  61. #define SZ_RUNDLL32 TEXT("RUNDLL32.EXE")
  62. #define SZ_INSTALLED_PROGRAMS TEXT("shell32.dll,Control_RunDLL appwiz.cpl")
  63. #define SZ_RUN_INSTALLED_PROGRAMS TEXT("control.exe appwiz.cpl")
  64. #define SZ_SYSOCMGR TEXT("sysocmgr.exe")
  65. #define SZ_WINDOWS_SETUP TEXT("/i:%s\\sysoc.inf")
  66. #define DEFAULT_PRIORITY 200
  67. #define MAX_GUID_STRING_LEN 39
  68. #define INTER_ITEM_SPACE 10
  69. #define DESCRIPTION_LENGTH 512
  70. #define BUTTONTEXT_LENGTH 50
  71. #define MAX_DESC_LEN 100
  72. #define INDENT 5
  73. #define cbRESOURCE 256
  74. #define NUM_BYTES_IN_MB 0x100000
  75. extern HINSTANCE g_hInstance;
  76. extern HWND g_hDlg;
  77. #ifdef DEBUG
  78. #define MI_TRAP _asm int 3
  79. void
  80. DebugPrint(
  81. HRESULT hr,
  82. LPCSTR lpFormat,
  83. ...
  84. );
  85. #define MiDebugMsg( args ) DebugPrint args
  86. #else
  87. #define MI_TRAP
  88. #define MiDebugMsg( args )
  89. #endif // DEBUG
  90. #endif // COMMON_H
  91. /*
  92. **------------------------------------------------------------------------------
  93. ** End of File
  94. **------------------------------------------------------------------------------
  95. */