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.

75 lines
2.7 KiB

  1. #ifndef COMMON_H
  2. #define COMMON_H
  3. #define STRICT
  4. #include <windows.h>
  5. #include <windowsx.h>
  6. #include <shlobj.h>
  7. #include <shlwapi.h>
  8. #include <strsafe.h>
  9. #define DDEVCF_DOSUBDIRS 0x00000001 // recursively search/remove
  10. #define DDEVCF_REMOVEAFTERCLEAN 0x00000002 // remove from the registry after run once
  11. #define DDEVCF_REMOVEREADONLY 0x00000004 // remove file even if it is read-only
  12. #define DDEVCF_REMOVESYSTEM 0x00000008 // remove file even if it is system
  13. #define DDEVCF_REMOVEHIDDEN 0x00000010 // remove file even if it is hidden
  14. #define DDEVCF_DONTSHOWIFZERO 0x00000020 // don't show this cleaner if it has nothing to clean
  15. #define DDEVCF_REMOVEDIRS 0x00000040 // Match filelist against directories and remove everything under them.
  16. #define DDEVCF_RUNIFOUTOFDISKSPACE 0x00000080 // Only run if machine is out of disk space.
  17. #define DDEVCF_REMOVEPARENTDIR 0x00000100 // remove the parent directory once done.
  18. #define DDEVCF_PRIVATE_LASTACCESS 0x10000000 // use LastAccessTime
  19. #define FILETIME_HOUR_HIGH 0x000000C9 // High DWORD for a FILETIME hour
  20. #define FILETIME_HOUR_LOW 0x2A69C000 // Low DWORD for a FILETIME hour
  21. #define CLSID_STRING_SIZE 39
  22. #define DESCRIPTION_LENGTH 512
  23. #define BUTTONTEXT_LENGTH 50
  24. #define DISPLAYNAME_LENGTH 128
  25. #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  26. #define REGSTR_VAL_BITMAPDISPLAY TEXT("BitmapDisplay")
  27. #define REGSTR_VAL_URL TEXT("URL")
  28. #define REGSTR_VAL_FOLDER TEXT("folder")
  29. #define REGSTR_VAL_CSIDL TEXT("CSIDL")
  30. #define REGSTR_VAL_FILELIST TEXT("FileList")
  31. #define REGSTR_VAL_LASTACCESS TEXT("LastAccess")
  32. #define REGSTR_VAL_FLAGS TEXT("Flags") // DDEVCF_ flags
  33. #define REGSTR_VAL_CLEANUPSTRING TEXT("CleanupString")
  34. #define REGSTR_VAL_FAILIFPROCESSRUNNING TEXT("FailIfProcessRunning")
  35. #define REGSTR_PATH_SETUP_SETUP TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Setup")
  36. typedef struct tag_CleanFileStruct
  37. {
  38. TCHAR file[MAX_PATH];
  39. ULARGE_INTEGER ulFileSize;
  40. BOOL bSelected;
  41. BOOL bDirectory;
  42. struct tag_CleanFileStruct *pNext;
  43. } CLEANFILESTRUCT, *PCLEANFILESTRUCT;
  44. #ifdef _DEBUG
  45. #define DEBUG
  46. #endif
  47. #ifdef DEBUG
  48. #define MI_TRAP _asm int 3
  49. void
  50. DebugPrint(
  51. HRESULT hr,
  52. LPCTSTR lpFormat,
  53. ...
  54. );
  55. #define MiDebugMsg( args ) DebugPrint args
  56. #else
  57. #define MI_TRAP
  58. #define MiDebugMsg( args )
  59. #endif // DEBUG
  60. #endif // COMMON_H