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