-
Notifications
You must be signed in to change notification settings - Fork 1
/
stubs.c
118 lines (107 loc) · 3.11 KB
/
stubs.c
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#include "stubs.h"
#include "general.h"
#include "debug.h"
#include "internal.h"
int DOKAN_CALLBACK MxfsMoveFile(
LPCWSTR ExistingFileName,
LPCWSTR NewFileName,
BOOL ReplaceExisiting,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls %ls %u", ExistingFileName, NewFileName, ReplaceExisiting ? 1 : 0);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsLockFile(
LPCWSTR FileName,
LONGLONG ByteOffset,
LONGLONG Length,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls %I64u %I64u", FileName, ByteOffset, Length);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsUnlockFile(
LPCWSTR FileName,
LONGLONG ByteOffset,
LONGLONG Length,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls %I64u %I64u", FileName, ByteOffset, Length);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsUnmount(
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("");
return -ERROR_CALL_NOT_IMPLEMENTED;
}
// Optional
int DOKAN_CALLBACK MxfsFlushFileBuffers(
LPCWSTR FileName,
PDOKAN_FILE_INFO FileInfo)
{
TRACE("%ls", FileName);
MINIX_FS *FileSys = (MINIX_FS*)(ULONG_PTR)FileInfo->DokanOptions->GlobalContext;
MxfsCacheFlush(FileSys); // flush entire FS...
return 0;
}
int DOKAN_CALLBACK MxfsSetFileAttributes(
LPCWSTR FileName,
DWORD FileAttributes,
PDOKAN_FILE_INFO FileInfo)
{
TRACE("%ls", FileName);
return 0;
}
// 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)
{
UNIMPLEMENTED("%ls", FileName);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsDeleteDirectory(
LPCWSTR FileName,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls", FileName);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsSetAllocationSize(
LPCWSTR FileName,
LONGLONG Length,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls", FileName);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
// 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)
{
UNIMPLEMENTED("%ls", FileName);
return -ERROR_CALL_NOT_IMPLEMENTED;
}
int DOKAN_CALLBACK MxfsSetFileSecurity(
LPCWSTR FileName,
PSECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR SecurityDescriptor,
ULONG SecurityDescriptorLength,
PDOKAN_FILE_INFO FileInfo)
{
UNIMPLEMENTED("%ls", FileName);
return -ERROR_CALL_NOT_IMPLEMENTED;
}