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.

68 lines
1.7 KiB

  1. #ifndef _TIMEWARP_H
  2. #define _TIMEWARP_H
  3. #if defined(__cplusplus)
  4. extern "C" {
  5. #endif
  6. // If the API here are ever made public, these 2 symbols should be
  7. // moved somewhere else (not public).
  8. #define SNAPSHOT_NAME_LENGTH 24 // strlen("@GMT-YYYY.MM.DD-HH.MM.SS")
  9. #define SNAPSHOT_MARKER L"@GMT-"
  10. #define QUERY_SNAPSHOT_EXISTING 0x1
  11. #define QUERY_SNAPSHOT_DIFFERENT 0x2
  12. DWORD
  13. QuerySnapshotsForPath(
  14. IN LPCWSTR lpszFilePath,
  15. IN DWORD dwQueryFlags,
  16. OUT LPWSTR* ppszPathMultiSZ,
  17. OUT LPDWORD iNumberOfPaths );
  18. /*++
  19. Routine Description:
  20. This function takes a path and returns an array of snapshot-paths to the file.
  21. (These are the paths to be passed to Win32 functions to obtain handles to the
  22. previous versions of the file.)
  23. Arguments:
  24. lpszFilePath - The UNICODE path to the file or directory
  25. dwQueryFlags - See Notes below
  26. ppszPathMultiSZ - Upon successful return, the allocated array of the path
  27. iNumberOfPaths - Upon successful return, the number of paths returned
  28. Return Value:
  29. Windows Error code
  30. Notes:
  31. - The user is responsible for freeing the returned buffer with LocalFree
  32. - The possible flags are:
  33. Return only the path names where the file exists
  34. #define QUERY_SNAPSHOT_EXISTING 0x1
  35. Return the minimum set of paths to the different versions of the
  36. files. (Does LastModifiedTime checking)
  37. #define QUERY_SNAPSHOT_DIFFERENT 0x2
  38. --*/
  39. DWORD
  40. GetSnapshotTimeFromPath(
  41. IN LPCWSTR lpszFilePath,
  42. IN OUT FILETIME *pUTCTime
  43. );
  44. #if defined(__cplusplus)
  45. }
  46. #endif
  47. #endif // _TIMEWARP_H