Skip to content

Update dokan legacy application to Dokany

Liryna edited this page Jul 27, 2016 · 4 revisions

To move your dokan legacy application to Dokany >= 0.8.0:

  • Change win32 errors to NTSTATUS. You can use DokanNtStatusFromWin32 to translate Win32 Error code to the NtStatus code's corresponding (More info and help here)
  • Remove the KeepAlive option that no longer exist.
  • Add Mounted & Unmounted DokanOperations
  • Use new CreateFile -> ZwCreateFile - To get CreateFile Parameters from ZwCreateFile, you simply need to call DokanMapKernelToUserCreateFileFlags like this:
DokanMapKernelToUserCreateFileFlags(
      FileAttributes, CreateOptions, CreateDisposition, &fileAttributesAndFlags,
      &creationDisposition);

Dokany 0.7.4 is the last version compatible with Dokan legacy. The 0.7.4 have a lots of fix that make it more stable than Dokan 0.6.0. You can use it if you don't want to update your code but Dokany does not maintain this version anymore..

Clone this wiki locally