Source code of Windows XP (NT5)
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.

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