Skip to content

Commit

Permalink
fixed error with dynamic library #13
Browse files Browse the repository at this point in the history
  • Loading branch information
landrix committed Jan 23, 2024
1 parent dded3cd commit b8acdc9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
18 changes: 9 additions & 9 deletions Dokan.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*
Dokan API wrapper for Delphi based on Release 2.0.5.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.5.1000
Copyright (C) 2019 - 2023 Sven Harazim
Dokan API wrapper for Delphi based on Release 2.0.6.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
Copyright (C) 2019 - 2024 Sven Harazim
Dokan : user-mode file system library for Windows
Expand Down Expand Up @@ -406,8 +406,8 @@ _DOKAN_MOUNT_POINT_INFO = record
DokanLibHandle: HMODULE = 0;
DokanInit: procedure; stdcall = nil;
DokanShutdown: procedure; stdcall = nil;
DokanMain: function (Options: DOKAN_OPTIONS; Operations: DOKAN_OPERATIONS): Integer; stdcall = nil;
DokanCreateFileSystem: function (DokanOptions : DOKAN_OPTIONS; DokanOperations : DOKAN_OPERATIONS; var DokanInstance : DOKAN_HANDLE) : Integer; stdcall = nil;
DokanMain: function (Options: PDOKAN_OPTIONS; Operations: PDOKAN_OPERATIONS): Integer; stdcall = nil;
DokanCreateFileSystem: function (DokanOptions : PDOKAN_OPTIONS; DokanOperations : PDOKAN_OPERATIONS; var DokanInstance : DOKAN_HANDLE) : Integer; stdcall = nil;
DokanIsFileSystemRunning: function (DokanInstance : DOKAN_HANDLE) : BOOL; stdcall = nil;
DokanWaitForFileSystemClosed: function (DokanInstance : DOKAN_HANDLE; dwMilliseconds : DWORD) : DWORD; stdcall = nil;
DokanCloseHandle: procedure (DokanInstance : DOKAN_HANDLE); stdcall = nil;
Expand All @@ -423,11 +423,11 @@ _DOKAN_MOUNT_POINT_INFO = record
DokanMapKernelToUserCreateFileFlags: procedure (DesiredAccess: ACCESS_MASK; FileAttributes, CreateOptions,
CreateDisposition: ULONG;outDesiredAccess: PACCESS_MASK; outFileAttributesAndFlags,
outCreationDisposition: PDWORD); stdcall = nil;
DokanNotifyCreate: function (FilePath: LPCWSTR; IsDirectory : BOOL) : BOOL; stdcall = nil;
DokanNotifyCreate: function (DokanInstance : DOKAN_HANDLE; FilePath: LPCWSTR; IsDirectory : BOOL) : BOOL; stdcall = nil;
DokanNotifyDelete: function (DokanInstance : DOKAN_HANDLE; FilePath : LPCWSTR; IsDirectory : BOOL) : BOOL; stdcall = nil;
DokanNotifyUpdate: function (FilePath : LPCWSTR) : BOOL; stdcall = nil;
DokanNotifyXAttrUpdate: function (FilePath : LPCWSTR) : BOOL; stdcall = nil;
DokanNotifyRename: function (OldPath: LPCWSTR; NewPath : LPCWSTR; IsDirectory : BOOL;
DokanNotifyUpdate: function (DokanInstance : DOKAN_HANDLE; FilePath : LPCWSTR) : BOOL; stdcall = nil;
DokanNotifyXAttrUpdate: function (DokanInstance : DOKAN_HANDLE; FilePath : LPCWSTR) : BOOL; stdcall = nil;
DokanNotifyRename: function (DokanInstance : DOKAN_HANDLE; OldPath: LPCWSTR; NewPath : LPCWSTR; IsDirectory : BOOL;
IsInSameDirectory: BOOL) : BOOL; stdcall = nil;
DokanNtStatusFromWin32: function (Error: DWORD): NTSTATUS; stdcall = nil;

Expand Down
6 changes: 3 additions & 3 deletions DokanWin.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*
Dokan API wrapper for Delphi based on Release 2.0.5.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.5.1000
Copyright (C) 2019 - 2023 Sven Harazim
Dokan API wrapper for Delphi based on Release 2.0.6.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
Copyright (C) 2019 - 2024 Sven Harazim
Dokan : user-mode file system library for Windows
Expand Down
8 changes: 5 additions & 3 deletions Samples/Mirror/Mirror.dpr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(*
Dokan API wrapper for Delphi based on Release 2.0.5.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.5.1000
Copyright (C) 2019 - 2023 Sven Harazim
Dokan API wrapper for Delphi based on Release 2.0.6.1000
https://github.com/dokan-dev/dokany/releases/tag/v2.0.6.1000
Copyright (C) 2019 - 2024 Sven Harazim
Dokan : user-mode file system library for Windows
Expand Down Expand Up @@ -1894,9 +1894,11 @@ begin
dokanOperations.FindStreams := MirrorFindStreams;
dokanOperations.Mounted := MirrorMounted;

//if defined Dokan.pas DOKAN_EXPLICIT_LINK then call DokanLoad;
DokanInit;
status := DokanMain(@dokanOptions, @dokanOperations);
DokanShutdown;
//if defined Dokan.pas DOKAN_EXPLICIT_LINK then call DokanFree
case (status) of
DOKAN_SUCCESS:
Writeln(ErrOutput, 'Success');
Expand Down
2 changes: 1 addition & 1 deletion Samples/Mirror/Mirror.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppType>Console</AppType>
<FrameworkType>None</FrameworkType>
<ProjectVersion>20.1</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
Expand Down

0 comments on commit b8acdc9

Please sign in to comment.