Skip to content

Commit 919e613

Browse files
committed
Update Dokan version to 2.2.0.1000
1 parent df2f36d commit 919e613

File tree

6 files changed

+27
-12
lines changed

6 files changed

+27
-12
lines changed

Dokan.pas

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(*
2-
Dokan API wrapper for Delphi based on Release 2.0.6.1000
3-
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
2+
Dokan API wrapper for Delphi based on Release 2.2.0.1000
3+
https://github.com/dokan-dev/dokany/releases/tag/v2.2.0.1000
44
Copyright (C) 2019 - 2024 Sven Harazim
55
66
Dokan : user-mode file system library for Windows
@@ -44,7 +44,7 @@ interface
4444
DokanLibrary = 'dokan2.dll';
4545

4646
//The current Dokan version (200 means ver 2.0.0).
47-
DOKAN_VERSION = 206;
47+
DOKAN_VERSION = 220;
4848
//Minimum Dokan version (ver 2.0.0) accepted
4949
DOKAN_MINIMUM_COMPATIBLE_VERSION = 200;
5050

@@ -68,12 +68,15 @@ interface
6868
//Use mount manager
6969
DOKAN_OPTION_MOUNT_MANAGER = 64;
7070
//Mount the drive on current session only
71+
//Note: As Windows process only have on sessionID which is here used to define what is the current session,
72+
//impersonation will not work if someone attend to mount for a user from another one (like system service).
73+
//See issue #1196
7174
DOKAN_OPTION_CURRENT_SESSION = 128;
7275
//Enable Lockfile/Unlockfile operations. Otherwise Dokan will take care of it
7376
DOKAN_OPTION_FILELOCK_USER_MODE = 256;
7477
//Enable Case sensitive path.
7578
//By default all path are case insensitive.
76-
//For case sensitive: \dir\File & \diR\file are different files
79+
//For case sensitive: \dir\File & \diR\\file are different files
7780
//but for case insensitive they are the same.
7881
DOKAN_OPTION_CASE_SENSITIVE = 512;
7982
//Allows unmounting of network drive via explorer */
@@ -88,14 +91,15 @@ interface
8891

8992
type
9093
DOKAN_HANDLE = THandle;
94+
HANDLE = THandle;
9195

9296
//Dokan mount options used to describe Dokan device behavior.
9397
_DOKAN_OPTIONS = record
9498
Version: USHORT; //Version of the Dokan features requested without dots (version "123" is equal to Dokan version 1.2.3).
9599
SingleThread: ByteBool; //Only use a single thread to process events. This is highly not recommended as can easily create a bottleneck.
96100
Options: ULONG; //Features enabled for the mount. See \ref DOKAN_OPTION.
97101
GlobalContext: ULONG64; //FileSystem can store anything here.
98-
MountPoint: LPCWSTR; //Mount point. It can be a driver letter like "M:\" or a folder path "C:\mount\dokan" on a NTFS partition.
102+
MountPoint: LPCWSTR; //Mount point. It can be a driver letter like "M:\" or an existing empty folder path "C:\mount\dokan" on a NTFS partition. */
99103
UNCName: LPCWSTR; //UNC Name for the Network Redirector
100104
Timeout: ULONG; //Max timeout in milliseconds of each request before Dokan gives up to wait events to complete. The default timeout value is 15 seconds.
101105
AllocationUnitSize: ULONG;//Allocation Unit Size of the volume. This will affect the file size.
@@ -410,6 +414,8 @@ _DOKAN_MOUNT_POINT_INFO = record
410414
DokanCreateFileSystem: function (DokanOptions : PDOKAN_OPTIONS; DokanOperations : PDOKAN_OPERATIONS; var DokanInstance : DOKAN_HANDLE) : Integer; stdcall = nil;
411415
DokanIsFileSystemRunning: function (DokanInstance : DOKAN_HANDLE) : BOOL; stdcall = nil;
412416
DokanWaitForFileSystemClosed: function (DokanInstance : DOKAN_HANDLE; dwMilliseconds : DWORD) : DWORD; stdcall = nil;
417+
DokanRegisterWaitForFileSystemClosed: function (DokanInstance : DOKAN_HANDLE; var WaitHandle : PHANDLE; Callback : TWaitOrTimerCallback; Context : PVOID; dwMilliseconds : DWORD): BOOL; stdcall = nil;
418+
DokanUnregisterWaitForFileSystemClosed: function (WaitHandle : HANDLE; WaitForCallbacks : BOOL): BOOL; stdcall = nil;
413419
DokanCloseHandle: procedure (DokanInstance : DOKAN_HANDLE); stdcall = nil;
414420
DokanUnmount: function (DriveLetter: WCHAR): BOOL; stdcall = nil;
415421
DokanRemoveMountPoint: function (MountPoint: LPCWSTR): BOOL; stdcall = nil;
@@ -442,6 +448,8 @@ function DokanMain(Options: PDOKAN_OPTIONS; Operations: PDOKAN_OPERATIONS): Inte
442448
function DokanCreateFileSystem(DokanOptions : PDOKAN_OPTIONS; DokanOperations : PDOKAN_OPERATIONS; var DokanInstance : DOKAN_HANDLE) : Integer; stdcall;
443449
function DokanIsFileSystemRunning(DokanInstance : DOKAN_HANDLE) : BOOL; stdcall;
444450
function DokanWaitForFileSystemClosed(DokanInstance : DOKAN_HANDLE; dwMilliseconds : DWORD) : DWORD; stdcall;
451+
function DokanRegisterWaitForFileSystemClosed(DokanInstance : DOKAN_HANDLE; var WaitHandle : PHANDLE; Callback : TWaitOrTimerCallback; Context : PVOID; dwMilliseconds : DWORD): BOOL; stdcall;
452+
function DokanUnregisterWaitForFileSystemClosed(WaitHandle : HANDLE; WaitForCallbacks : BOOL): BOOL; stdcall;
445453
procedure DokanCloseHandle(DokanInstance : DOKAN_HANDLE); stdcall;
446454
function DokanUnmount(DriveLetter: WCHAR): BOOL; stdcall;
447455
function DokanRemoveMountPoint(MountPoint: LPCWSTR): BOOL; stdcall;
@@ -496,6 +504,8 @@ function DokanLoad(const LibFileName: string = DokanLibrary): Boolean;
496504
DokanCreateFileSystem := GetProc('DokanCreateFileSystem');
497505
DokanIsFileSystemRunning := GetProc('DokanIsFileSystemRunning');
498506
DokanWaitForFileSystemClosed := GetProc('DokanWaitForFileSystemClosed');
507+
DokanRegisterWaitForFileSystemClosed := GetProc('DokanRegisterWaitForFileSystemClosed');
508+
DokanUnregisterWaitForFileSystemClosed := GetProc('DokanUnregisterWaitForFileSystemClosed');
499509
DokanCloseHandle := GetProc('DokanCloseHandle');
500510
DokanUnmount := GetProc('DokanUnmount');
501511
DokanRemoveMountPoint := GetProc('DokanRemoveMountPoint');
@@ -530,6 +540,8 @@ procedure DokanFree();
530540
DokanCreateFileSystem := nil;
531541
DokanIsFileSystemRunning := nil;
532542
DokanWaitForFileSystemClosed := nil;
543+
DokanRegisterWaitForFileSystemClosed := nil;
544+
DokanUnregisterWaitForFileSystemClosed := nil;
533545
DokanCloseHandle := nil;
534546
DokanUnmount := nil;
535547
DokanRemoveMountPoint := nil;
@@ -561,6 +573,8 @@ function DokanMain; external DokanLibrary;
561573
function DokanCreateFileSystem; external DokanLibrary;
562574
function DokanIsFileSystemRunning; external DokanLibrary;
563575
function DokanWaitForFileSystemClosed; external DokanLibrary;
576+
function DokanRegisterWaitForFileSystemClosed; external DokanLibrary;
577+
function DokanUnregisterWaitForFileSystemClosed; external DokanLibrary;
564578
procedure DokanCloseHandle; external DokanLibrary;
565579
function DokanUnmount; external DokanLibrary;
566580
function DokanRemoveMountPoint; external DokanLibrary;

DokanWin.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(*
2-
Dokan API wrapper for Delphi based on Release 2.0.6.1000
3-
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
2+
Dokan API wrapper for Delphi based on Release 2.2.0.1000
3+
https://github.com/dokan-dev/dokany/releases/tag/v2.2.0.1000
44
Copyright (C) 2019 - 2024 Sven Harazim
55
66
Dokan : user-mode file system library for Windows

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Delphi/FreePascal and Dokan library
1515
## Supported Dokan Version
1616
https://github.com/dokan-dev/dokany
1717

18-
2.0.6.1000
18+
2.2.0.1000
1919

20-
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
20+
https://github.com/dokan-dev/dokany/releases/tag/v2.2.0.1000

Samples/Mirror/Mirror.dpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(*
2-
Dokan API wrapper for Delphi based on Release 2.0.6.1000
3-
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
2+
Dokan API wrapper for Delphi based on Release 2.2.0.1000
3+
https://github.com/dokan-dev/dokany/releases/tag/v2.2.0.1000
44
Copyright (C) 2019 - 2024 Sven Harazim
55
66
Dokan : user-mode file system library for Windows

Samples/Mirror/Mirror.dproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<AppType>Console</AppType>
99
<FrameworkType>None</FrameworkType>
1010
<ProjectVersion>20.1</ProjectVersion>
11-
<Platform Condition="'$(Platform)'==''">Win32</Platform>
11+
<Platform Condition="'$(Platform)'==''">Win64</Platform>
12+
<ProjectName Condition="'$(ProjectName)'==''">Mirror</ProjectName>
1213
</PropertyGroup>
1314
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
1415
<Base>true</Base>

Samples/Mirror/Mirror.res

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)