stubs.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef STUBS_H_INCLUDED
  2. #define STUBS_H_INCLUDED
  3. #include <windows.h>
  4. #include "dokan.h"
  5. int DOKAN_CALLBACK MxfsMoveFile(
  6. LPCWSTR ExistingFileName,
  7. LPCWSTR NewFileName,
  8. BOOL ReplaceExisiting,
  9. PDOKAN_FILE_INFO FileInfo);
  10. int DOKAN_CALLBACK MxfsLockFile(
  11. LPCWSTR FileName,
  12. LONGLONG ByteOffset,
  13. LONGLONG Length,
  14. PDOKAN_FILE_INFO FileInfo);
  15. int DOKAN_CALLBACK MxfsUnlockFile(
  16. LPCWSTR FileName,
  17. LONGLONG ByteOffset,
  18. LONGLONG Length,
  19. PDOKAN_FILE_INFO FileInfo);
  20. int DOKAN_CALLBACK MxfsUnmount(
  21. PDOKAN_FILE_INFO FileInfo);
  22. // Optional
  23. int DOKAN_CALLBACK MxfsFlushFileBuffers(
  24. LPCWSTR FileName,
  25. PDOKAN_FILE_INFO FileInfo);
  26. int DOKAN_CALLBACK MxfsSetFileAttributes(
  27. LPCWSTR FileName,
  28. DWORD FileAttributes,
  29. PDOKAN_FILE_INFO FileInfo);
  30. // You should not delete file on DeleteFile or DeleteDirectory.
  31. // When DeleteFile or DeleteDirectory, you must check whether
  32. // you can delete the file or not, and return 0 (when you can delete it)
  33. // or appropriate error codes such as -ERROR_DIR_NOT_EMPTY,
  34. // -ERROR_SHARING_VIOLATION.
  35. // When you return 0 (ERROR_SUCCESS), you get Cleanup with
  36. // FileInfo->DeleteOnClose set TRUE and you have to delete the
  37. // file in Close.
  38. int DOKAN_CALLBACK MxfsDeleteFile(
  39. LPCWSTR FileName,
  40. PDOKAN_FILE_INFO FileInfo);
  41. int DOKAN_CALLBACK MxfsDeleteDirectory(
  42. LPCWSTR FileName,
  43. PDOKAN_FILE_INFO FileInfo);
  44. int DOKAN_CALLBACK MxfsSetAllocationSize(
  45. LPCWSTR FileName,
  46. LONGLONG Length,
  47. PDOKAN_FILE_INFO FileInfo);
  48. // Suported since 0.6.0. You must specify the version at DOKAN_OPTIONS.Version.
  49. int DOKAN_CALLBACK MxfsGetFileSecurity(
  50. LPCWSTR FileName,
  51. PSECURITY_INFORMATION SecurityInfo, // A pointer to SECURITY_INFORMATION value being requested
  52. PSECURITY_DESCRIPTOR SecurityDescriptor, // A pointer to SECURITY_DESCRIPTOR buffer to be filled
  53. ULONG SecurityDescriptorLength, // length of Security descriptor buffer
  54. PULONG LengthNeeded,
  55. PDOKAN_FILE_INFO FileInfo);
  56. int DOKAN_CALLBACK MxfsSetFileSecurity(
  57. LPCWSTR FileName,
  58. PSECURITY_INFORMATION SecurityInfo,
  59. PSECURITY_DESCRIPTOR SecurityDescriptor,
  60. ULONG SecurityDescriptorLength,
  61. PDOKAN_FILE_INFO FileInfo);
  62. #endif // STUBS_H_INCLUDED