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.

40 lines
1.1 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: docfilep.hxx
  7. //
  8. // Contents: Private DocFile definitions
  9. //
  10. //---------------------------------------------------------------
  11. #ifndef __DOCFILEP_HXX__
  12. #define __DOCFILEP_HXX__
  13. #define CWCMAXPATHCOMPLEN CWCSTREAMNAME
  14. #define CBMAXPATHCOMPLEN (CWCMAXPATHCOMPLEN*sizeof(WCHAR))
  15. // Common bundles of STGM flags
  16. #define STGM_RDWR (STGM_READ | STGM_WRITE | STGM_READWRITE)
  17. #define STGM_DENY (STGM_SHARE_DENY_NONE | STGM_SHARE_DENY_READ | \
  18. STGM_SHARE_DENY_WRITE | STGM_SHARE_EXCLUSIVE)
  19. #define VALID_IFTHERE(it) \
  20. ((it) == STG_FAILIFTHERE || (it) == STG_CREATEIFTHERE || \
  21. (it) == STG_CONVERTIFTHERE)
  22. #define VALID_COMMIT(cf) \
  23. (((cf) & ~(STGC_OVERWRITE | STGC_ONLYIFCURRENT | \
  24. STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE)) == 0)
  25. #define VALID_LOCKTYPE(lt) \
  26. ((lt) == LOCK_WRITE || (lt) == LOCK_EXCLUSIVE || \
  27. (lt) == LOCK_ONLYONCE)
  28. #define FLUSH_CACHE(cf) \
  29. ((cf & STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE) == 0)
  30. #endif