Debian Codegraph @

vhditools/mount_dokan.h

raw symbols SCIP
1 /*
2 * Mount tool dokan functions
3 *
4 * Copyright (C) 2012-2025, Joachim Metz <[email protected]>
5 *
6 * Refer to AUTHORS for acknowledgements.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #if !defined( _MOUNT_DOKAN_H )
23 #define _MOUNT_DOKAN_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #if defined( HAVE_LIBDOKAN )
29 #include <dokan.h>
30 #endif
31
32 #include "mount_file_entry.h"
33 #include "vhditools_libcerror.h"
34 #include "vhditools_libvhdi.h"
35
36 #if defined( __cplusplus )
37 extern "C" {
38 #endif
39
40 #if defined( HAVE_LIBDOKAN )
41
42 int mount_dokan_set_file_information(
43 BY_HANDLE_FILE_INFORMATION *file_information,
44 size64_t size,
45 uint16_t file_mode,
46 uint64_t creation_time,
47 uint64_t access_time,
48 uint64_t modification_time,
49 libcerror_error_t **error );
50
51 int mount_dokan_set_find_data(
52 WIN32_FIND_DATAW *find_data,
53 size64_t size,
54 uint16_t file_mode,
55 uint64_t creation_time,
56 uint64_t access_time,
57 uint64_t modification_time,
58 libcerror_error_t **error );
59
60 int mount_dokan_filldir(
61 PFillFindData fill_find_data,
62 DOKAN_FILE_INFO *file_info,
63 wchar_t *name,
64 size_t name_size,
65 WIN32_FIND_DATAW *find_data,
66 mount_file_entry_t *file_entry,
67 libcerror_error_t **error );
68
69 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
70 int __stdcall mount_dokan_CreateFile(
71 const wchar_t *path,
72 DWORD desired_access,
73 DWORD share_mode,
74 DWORD creation_disposition,
75 DWORD attribute_flags,
76 DOKAN_FILE_INFO *file_info );
77 #else
78 NTSTATUS __stdcall mount_dokan_ZwCreateFile(
79 const wchar_t *path,
80 DOKAN_IO_SECURITY_CONTEXT *security_context,
81 ACCESS_MASK desired_access,
82 ULONG file_attributes,
83 ULONG share_access,
84 ULONG creation_disposition,
85 ULONG creation_options,
86 DOKAN_FILE_INFO *file_info );
87 #endif
88
89 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
90 int __stdcall mount_dokan_OpenDirectory(
91 const wchar_t *path,
92 DOKAN_FILE_INFO *file_info );
93 #endif
94
95 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
96 int __stdcall mount_dokan_CloseFile(
97 const wchar_t *path,
98 DOKAN_FILE_INFO *file_info );
99 #else
100 NTSTATUS __stdcall mount_dokan_CloseFile(
101 const wchar_t *path,
102 DOKAN_FILE_INFO *file_info );
103 #endif
104
105 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
106 int __stdcall mount_dokan_ReadFile(
107 const wchar_t *path,
108 void *buffer,
109 DWORD number_of_bytes_to_read,
110 DWORD *number_of_bytes_read,
111 LONGLONG offset,
112 DOKAN_FILE_INFO *file_info );
113 #else
114 NTSTATUS __stdcall mount_dokan_ReadFile(
115 const wchar_t *path,
116 void *buffer,
117 DWORD number_of_bytes_to_read,
118 DWORD *number_of_bytes_read,
119 LONGLONG offset,
120 DOKAN_FILE_INFO *file_info );
121 #endif
122
123 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
124 int __stdcall mount_dokan_FindFiles(
125 const wchar_t *path,
126 PFillFindData fill_find_data,
127 DOKAN_FILE_INFO *file_info );
128 #else
129 NTSTATUS __stdcall mount_dokan_FindFiles(
130 const wchar_t *path,
131 PFillFindData fill_find_data,
132 DOKAN_FILE_INFO *file_info );
133 #endif
134
135 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
136 int __stdcall mount_dokan_GetFileInformation(
137 const wchar_t *path,
138 BY_HANDLE_FILE_INFORMATION *file_information,
139 DOKAN_FILE_INFO *file_info );
140 #else
141 NTSTATUS __stdcall mount_dokan_GetFileInformation(
142 const wchar_t *path,
143 BY_HANDLE_FILE_INFORMATION *file_information,
144 DOKAN_FILE_INFO *file_info );
145 #endif
146
147 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
148 int __stdcall mount_dokan_GetVolumeInformation(
149 wchar_t *volume_name,
150 DWORD volume_name_size,
151 DWORD *volume_serial_number,
152 DWORD *maximum_filename_length,
153 DWORD *file_system_flags,
154 wchar_t *file_system_name,
155 DWORD file_system_name_size,
156 DOKAN_FILE_INFO *file_info );
157 #else
158 NTSTATUS __stdcall mount_dokan_GetVolumeInformation(
159 wchar_t *volume_name,
160 DWORD volume_name_size,
161 DWORD *volume_serial_number,
162 DWORD *maximum_filename_length,
163 DWORD *file_system_flags,
164 wchar_t *file_system_name,
165 DWORD file_system_name_size,
166 DOKAN_FILE_INFO *file_info );
167 #endif
168
169 #if ( DOKAN_VERSION >= 600 ) && ( DOKAN_VERSION < 800 )
170 int __stdcall mount_dokan_Unmount(
171 DOKAN_FILE_INFO *file_info );
172 #endif
173
174 #endif /* defined( HAVE_LIBDOKAN ) */
175
176 #if defined( __cplusplus )
177 }
178 #endif
179
180 #endif /* !defined( _MOUNT_DOKAN_H ) */
181