Dokan library скачать для windows 10 x64

User mode file system library for windows with FUSE Wrapper - dokan-dev/dokany

2.0.6.1000

2.0.5.1000

2.0.4.1000

This is a minor version.

It focuses on clarifying the usage of FindFiles and FindFilesWithPattern with their changes in v2, removing UNCName possible prefix on CreateFile and few Kernel fixes.

Please see changelog for more details.
And again here is how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always !!! @ATRiiX @robert-j

2.0.3.2000

This is a patch version.

No new binaries were built for this version. They have only been repacked in a new installer that fixes the remaining conflict with the v1 one.

Please see changelog for more details.
And again here is how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always !!!

2.0.3.1000

This is a patch version.

The version focus on improving the read & write performances that in some cases were worse than v1. 2.0.3.1000 is now faster on all those scenarios by 10 to 42%. Otherwise few stability and installer fixes were added.

Please see changelog for more details.
And again here is how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always !!!

2.0.2.1000

This is a patch version.

It includes different library and kernel pulling thread fixes, a library crash and proper DokanResetTimeout support.

Please see changelog for more details.
And again here is how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always (@nikola-sh) !!!

2.0.1.2000

This is a patch version.

Even if this is only a patch version that polish the v2 first release and finally makes it possible to have Dokan v1 and v2 installed side to side… the DokanFCB storage was switched from a simple list O(n) to an Adelson-Velsky/Landis (AVL) table log(n).
It will not make much difference when a few files are open but if you had 16k files opened, the kernel would only make ~4 string compared instead of 16k which is 🚀 during CreateFile.

Benchmark that compare this version against 1.5.1.1000 in multiple scenarios here

Please see changelog for more details.
And again here is how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always (@ATRiiX) !!!

2.0.1.1000

2.0.0.2000

This is a major version.

We have finally moved to version 2!

Introduce Thread & Memory pool to process and pull events by batch.

This is highly based on #307 but without the async logic. The reason is to avoid using the kernel NotificationLoop that was dispatching requests to workers (userland thread) sequentially since wake up workers have a high cost of thread context switch.
The previous logic is nice when you want workers to be async (like #307) but as we have threads (and now even a thread poll) dedicated to pull and process events, there is no issue to make them synchronously wait in kernel for new events and directly take them from the pending request list.

The library will start with a single main thread that pulls events by batch and dispatches them to the thread pool but keeps the last one to be executed (or the only one) to be executed on the same thread. Each thread waken will do the same and pull new events at the same time. If none is returned, the thread goes back to sleep and otherwise does the same as the main thread (dispatch and process…etc).
Only the main thread waits indefinitely for new events while others wait 100ms in the kernel before returning back to userland.Batching events, thread and memory pool offers a great flexibility of resources especially on heavy load. Thousands of lines of code were changed in the library (thanks again to @Corillian contribution of full rewrite) but the public API hasn’t changed much.

After running multiple benchmarks against memfs, sequential requests are about +10-35% faster but in the real world with the thread pool the perf are way above. @Corillian full rewrite of FindFiles actually improved an astonishing +100-250%…crazy 😱

Much more was added, please see changelog
See here how to migrate an existing > 1.1.0 filesystem to 2.0.0.

Thanks to all the contributors as always (@ATRiiX) !!! and big thanks again to @Corillian who has waited years to get his work merged!

2.0.0.1000

При разработке программного обеспечения у пользователя может возникать необходимость симулировать файловые системы других операционных систем. Таким способом можно создавать программу в среде Windows и тестировать её работоспособность в окружениях Linux, MacOS, BSD-систем. Именно для упрощения данной задачи и используется библиотека Dokan Library.

Dokan Library – что это за программа как пользоваться и как её удалить

Обзор Dokan Library

Ключевое преимущество Dokan Library – это поддержка исполнения задач на уровне ядра Windows. Но это одновременно и недостаток: для полноценной работы библиотеки требуется установка скомпилированного драйвера (и выбор неправильного софта может привести к Blue Screen на этапе загрузки ОС). Подключение же виртуальных дисков при этом выполняется через протокол SSH. Их файловая система значения не имеет, так как Докан преобразовывает поступающие запросы в такие, которые будут понятны ядру Windows, что и позволяет эмулировать неподдерживаемые файловые системы или вовсе создавать свои собственные. Это своего рода аналог FUSE, используемой в Linux-системах.

Обзор Dokan Library

Для чего необходима Dokan Library и что это за программа: именно при отладке и проверке на работоспособность в окружении разных ОС библиотека чаще всего и используется. Это не отдельное приложение со своим GUI-интерфейсом, а набор системных исполнительных файлов под среду разработки Visual Studio. Библиотеку в форме исходного кода и exe-установщика можно скачать с соответствующей ветки GitHub. В дальнейшем потребуется установить актуальную версию Visual Studio, NuGet Package Manager и с данного пакетного менеджера импортировать нужную библиотеку (там она именуется как DokanNet).

Первоначально проект был разработан и вплоть до 2011 года поддерживался неким Hiroki Asakawa. Последняя созданная им публичная версия – 0.6.0. До 2014 года разработкой и поддержкой занималось GitHub-сообщество (исходный код открыт, публикуется под лицензиями LGPL и MIT).

Библиотека Dokan – проблемы при использовании

Основные проблемы, которые возникают при использовании Докан, следующие:

  1. Слабая совместимость при использовании свежих фреймворков .NET Framework. Практика показывает, что лучше всего использовать 4.5.2 с Либрари версии 1.2.0.1000. Текущая версия Dokan Library 0.0-beta1 нивелирует этот недостаток, но она всё ещё считается тестовой. Так что при создании новых проектов рекомендуется использовать .NET Framework именно 4.5.2.
  2. Подобрать драйвер самостоятельно – сложно. А если это сделать неправильно, то запуск Visual Studio (а то и загрузка ОС) будут заканчиваться критической ошибкой (синий экран смерти). Перечень всех актуальных драйверов (с расширением .sys и в форме исходного кода для компиляции) доступен на GitHub.
  3. При деинсталляции библиотеки часть исполнительных системных файлов остаются в Windows. Они не мешают нормальной работе операционной системы, но при установке других версий Докан могут вызывать ошибки (крах при попытке добавить библиотеку через пакетный менеджер Visual Studio). Подобное поведение наблюдается при переходе с Либрари 0.6.0 до версии 1.2.0.
  4. Интегрированный GUI, запускаемый через файл encfsw.exe, имеет скудный функционал. Поэтому без умения работать с Visual Studio освоить работу библиотеки сложно.

Как удалить Dokan

Для удаления предусмотрен классический деинсталлятор, копирующийся в папку установки. Но даже после его завершения в системе остаётся драйвер, который может вызывать ошибки при установке других библиотек, эмулирующих работу файловой системы на уровне ядра. Перед тем как удалить их вручную из папки System32 – driver (в Windows), рекомендуется очистить реестр от ранее интегрированных ключей (можно выполнить с помощью CCleaner). Естественно, что пользователь для этого должен обладать правами администратора. Предварительно также рекомендуется исключить библиотеку из Visual Studio через NuGet Package Manager или иной используемый пакетный менеджер.

Как удалить Dokan

Итак, Dokan Library – библиотека, позволяющая работать в среде Виндовс и пользоваться, эмулировать или даже создавать изначально неподдерживаемые файловые системы (например, EXT4, BTRFS). Исходный код открыт, опубликован на GitHub. Если у вас был опыт использования Dokan Library, просим рассказать об этом, а также о преимуществах, недостатках библиотеки, проблемах, с которыми при работе пришлось столкнуться.

dokan-dev / dokany
Goto Github
PK

View Code? Open in Web Editor
NEW

4.6K
207.0
607.0
5.94 MB

User mode file system library for windows with FUSE Wrapper

Home Page: http://dokan-dev.github.io

C 68.06%

C++ 6.34%

Makefile 0.02%

Batchfile 0.02%

C# 0.80%

PowerShell 1.32%

CMake 0.17%

CSS 0.42%

JavaScript 0.72%

HTML 0.20%

SourcePawn 14.09%

SWIG 3.42%

NASL 4.42%

dokan

dokan-library

driver

kernel-mode

c

fuse

dll

sys

filesystem

filesystem-library

dokany’s Introduction

Github All Releases
Build status
Quality Gate Status
Codacy Badge
CII Best Practices
FOSSA Status
|
Bounty
|
Average time to resolve an issue
Percentage of issues still open

Dokan Demo

What is Dokan

When you want to create a new file system on Windows, other than FAT or NTFS,
you need to develop a file system driver. Developing a device driver that works
in kernel mode on windows is extremely technical. By using Dokan, you can create
your own file systems very easily without writing device drivers. Dokan is
similar to FUSE (Linux file system in user space) but works on Windows. Moreover,
dokany includes a FUSE wrapper
that helps you to port your FUSE filesystems without changes.

What is Dokany

Dokany is a fork of Dokan 0.6.0 with bug fixes, clean change history and
updated to build with latest tools.

Because the original Dokan Legacy (< 0.6.0) project is no longer maintained.

Since version 0.8.0, dokany broke compatibility with the dokan API. See
Choose a version
for more information.

The API has then again changed over time in 1.1.0 and 2.0.0.

Benchmark v1.5.1.1000 vs v2.0.3.1000

A benchmark that is testing multiple scenarios repeaditly and sequentially was run 5 times against the memfs sample of v1.5.1.1000 and v2.0.3.1000 in an idle environment to precise results.
The detail results can be seen in this spreadsheet here.
As better threading and memory poll were added in v2, it is expected that concurrent scenarios (like those tests) would be even more highly improved.

A sample of the results:

Create New      |  +13.55% | List          |  +60.69% | GetAttributes |  +48.78% | Read  | +18-42% |
Open/Overwrite  | +153.41% | ListExactFile | +131.91% | SetAttributes | +120.91% | Write | +10-32% |
RandomOpenClose | +173.05% |               |          | Delete        |  +90.83% |       |         |

Licensing

Dokan contains LGPL and MIT licensed programs.

  • user-mode library (dokan2.dll) LGPL
  • driver (dokan2.sys) LGPL
  • network library (dokannp2.dll) LGPL
  • fuse library (dokanfuse2.dll) LGPL
  • installer (DokanSetup.exe) LGPL
  • control program (dokanctl.exe) MIT
  • samples (mirror.exe / memfs.exe) MIT

For details, please check the license files.

  • LGPL license.lgpl.txt
  • MIT license.mit.txt

You can obtain source files from https://dokan-dev.github.io

Environment

Dokan works on

  • Windows Server 2019 / 2016 / 2012 (R2) / 2008 R2 SP1
  • Windows 11 / 10 / 8.1 / 8 / 7 SP1

Platform

  • x86
  • x64
  • ARM
  • ARM64

Signed Release and Debug drivers are provided at each release for all platforms.

How it works

Dokan library contains a user mode DLL (dokan2.dll) and a kernel mode file
system driver (dokan2.sys). Once the Dokan file system driver is installed, you can
create file systems which can be seen as normal file systems in Windows. The
application that creates file systems using Dokan library is called File system
application.

File operation requests from user programs (e.g., CreateFile, ReadFile,
WriteFile, …) will be sent to the Windows I/O subsystem (runs in kernel mode)
which will subsequently forward the requests to the Dokan file system driver
(dokan2.sys). By using functions provided by the Dokan user mode library
(dokan2.dll), file system applications are able to register callback functions
to the file system driver. The file system driver will invoke these callback
routines in order to respond to the requests it received. The results of the
callback routines will be sent back to the user program.

For example, when Windows Explorer requests to open a directory, the CreateFile
with Direction option request will be sent to Dokan file system driver and the
driver will invoke the CreateFile callback provided by the file system
application. The results of this routine are sent back to Windows Explorer as
the response to the CreateFile request. Therefore, the Dokan file system driver
acts as a proxy between user programs and file system applications. The
advantage of this approach is that it allows programmers to develop file systems
in user mode which is safe and easy to debug.

To learn more about Dokan file system development, see the
API documentation and the samples, especially dokan_memfs.

Build

In short, download and install the
Visual Studio 2019, select Windows 10 SDK component during the install or from the Tools menu &
install the WDK 10

For details, see the
build page.

Installation

For manual installation, see the
installation page.

Contribute

You want Dokan to get better? Contribute!

Learn the code and suggest your changes on
GitHub repository.

Detect defects and report them on
GitHub issue tracker.

Ask and answer questions on
Github Discussions or
Google discussion group.

dokany’s People

dokany’s Issues

mirror.c cannot delete empty directory

The code to delete a directory in mirror.c is the following:

hFind = FindFirstFile(filePath, &findData);
while (hFind != INVALID_HANDLE_VALUE) {
    if (wcscmp(findData.cFileName, L"..") != 0 &&
        wcscmp(findData.cFileName, L".") != 0) {
        FindClose(hFind);
        DbgPrint(L"  Directory is not empty: %sn", findData.cFileName);
        return -(int)ERROR_DIR_NOT_EMPTY;
    }
    if (!FindNextFile(hFind, &findData)) {
        break;
    }
}
FindClose(hFind);

if (GetLastError() == ERROR_NO_MORE_FILES) {
    return 0;
} else {
    return -1;
}

The deletion is actually done in dokan code, the value returned here just indicate if it is OK to delete the file or not. returning 0 triggers the file deletion.

When the directory is not empty, hFind is valid, we enter the loop and exit at some point with ERROR_NO_MORE_FILES as last error, all is fine.

When the directory is empty, hFind is INVALID_HANDLE_VALUE and so is the last error, therefore we return -1 and the directory is not deleted.

transifex/other tm.

if you want i can update the jp readme or spanish

Can’t uninstall dokany from the command line

Here’s an interesting one for you. It’s really quite difficult to uninstall Dokany from the command line. I have a Windows Server Core install that I’m using to test the BSOD bug and now I can’t remove Dokan.

Does the RC4 installer support any command line switches?

BSODs after DokanMounter service restart

Hi guys!
I’ve been investigating a BSOD issue in dokanx fork, than I found out about dokany fork, checked if that issue is reproduced here and it does, so I thinks you guys should know about it too.
Here is the summary:
When you mount your fs on some drive letter, restart DokanMounter service and then you try to kill that fs-app, the BSOD occurs. Here is full description (many letters): BenjaminKim/dokanx#47
Hope to get any comments and/or suggestions.
Thanks.

mirror.exe delete folder, blue screen

I installed dokan 0.7.0 and try:
mirror.exe /r e:/test /l M*
create empty folder and then delete it, blue screen occure.

I try dokan 0.6.0, it work fine.

Using Dokan as a Raw Disk

Hi,
Is it possible to use Dokan as a raw disk, and create a filesystem on it?

Thanks!

Enumerate Alternative Streams

PAGE_FAULT_IN_NONPAGED_AREA with Dokan 0.74

Just when I thought it was safe to develop on my laptop again.
I think this was caused when I was sitting at a breakpoint in Visual Studio.

3: kd> !analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced.  This cannot be protected by try-except,
it must be protected by a Probe.  Typically the address is just plain bad or it
is pointing at freed memory.
Arguments:
Arg1: ffffffffffffffe8, memory referenced.
Arg2: 0000000000000000, value 0 = read operation, 1 = write operation.
Arg3: fffff800cc121c8f, If non-zero, the instruction address which referenced the bad memory
    address.
Arg4: 0000000000000000, (reserved)

Debugging Details:
------------------


Could not read faulting driver name

READ_ADDRESS: unable to get nt!MmSpecialPoolStart
unable to get nt!MmSpecialPoolEnd
unable to get nt!MmPagedPoolEnd
unable to get nt!MmNonPagedPoolStart
unable to get nt!MmSizeOfNonPagedPoolInBytes
 ffffffffffffffe8 

FAULTING_IP: 
nt!ObQueryNameStringMode+5f
fffff800`cc121c8f 410fb64618      movzx   eax,byte ptr [r14+18h]

MM_INTERNAL_CODE:  0

CUSTOMER_CRASH_COUNT:  1

DEFAULT_BUCKET_ID:  WIN8_DRIVER_FAULT

BUGCHECK_STR:  AV

PROCESS_NAME:  CCleaner64.exe

CURRENT_IRQL:  2

ANALYSIS_VERSION: 6.3.9600.17336 (debuggers(dbg).150226-1500) amd64fre

TRAP_FRAME:  ffffd0002663ed50 -- (.trap 0xffffd0002663ed50)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=00ffffffffffffff rbx=0000000000000000 rcx=0000000000000000
rdx=00000000000000ff rsi=0000000000000000 rdi=0000000000000000
rip=fffff800cc121c8f rsp=ffffd0002663eee0 rbp=0000000000000000
 r8=00000000000000fe  r9=ffffd0002663f078 r10=fffff801ea485b80
r11=ffffd0002663f148 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         ov up ei pl nz na po cy
nt!ObQueryNameStringMode+0x5f:
fffff800`cc121c8f 410fb64618      movzx   eax,byte ptr [r14+18h] ds:00000000`00000018=??
Resetting default scope

LAST_CONTROL_TRANSFER:  from fffff800cbe2904a to fffff800cbdd8d00

STACK_TEXT:  
ffffd000`2663eb08 fffff800`cbe2904a : 00000000`00000050 ffffffff`ffffffe8 00000000`00000000 ffffd000`2663ed50 : nt!KeBugCheckEx
ffffd000`2663eb10 fffff800`cbcaa536 : 00000000`00000000 00000000`00000000 ffffd000`2663ed50 ffffe000`c0e40180 : nt! ?? ::FNODOBFM::`string'+0x4174a
ffffd000`2663ec00 fffff800`cbde1dbd : 00000000`00008000 fffff800`cbefd68d ffffe000`c2dfd000 ffffd000`2663eda0 : nt!MmAccessFault+0x696
ffffd000`2663ed50 fffff800`cc121c8f : 00000000`00000800 00000000`00000801 20206f49`00000008 fffff800`cbcd93e6 : nt!KiPageFault+0x13d
ffffd000`2663eee0 fffff800`cc1b5126 : 00000000`00000000 ffffe000`bb5f9f00 ffffe000`000000fe ffffd000`2663f078 : nt!ObQueryNameStringMode+0x5f
ffffd000`2663f000 fffff801`ea49954c : ffffd000`2663f0f0 00000000`00000000 00000000`c000014f fffff800`cbd31a4d : nt!ObQueryNameString+0xe
ffffd000`2663f040 fffff801`ea498322 : 00000000`00000000 ffffd000`2663f0b0 00000000`00000000 00000000`00000000 : FLTMGR!FltpGetObjectName+0x30
ffffd000`2663f070 fffff801`ea492d8c : ffffe000`be1f2980 ffffe000`c2204080 00000000`00000000 00000000`00000000 : FLTMGR!FltpFsControlMountVolume+0xa2
ffffd000`2663f150 fffff800`cc16eae2 : fffff800`cbfca540 00000000`00000000 ffffe000`c0e40080 ffffe000`c0e40080 : FLTMGR!FltpFsControl+0x14c
ffffd000`2663f1b0 fffff800`cbd53364 : ffffe000`c2204080 ffffe000`bfc6a990 ffffe000`c2204080 ffffd000`2663f480 : nt!IopMountVolume+0x35a
ffffd000`2663f430 fffff800`cc0b7367 : 00000000`00000005 00000000`00000000 ffffd000`2663f790 00000000`00000000 : nt!IopCheckVpbMounted+0x154
ffffd000`2663f480 fffff800`cc0b29d1 : ffffc000`b5e2a718 ffffc000`b5e2a718 ffffd000`2663f790 ffffe000`c2204050 : nt!IopParseDevice+0x4a7
ffffd000`2663f690 fffff800`cc11138c : ffffe000`bb3c7001 ffffd000`2663f8b8 00000000`00000040 ffffe000`ba20bf20 : nt!ObpLookupObjectName+0x711
ffffd000`2663f830 fffff800`cc10d69c : 00000000`00000001 ffffe000`bfc6a990 00000000`009ef2e0 00000000`009ef2d0 : nt!ObOpenObjectByName+0x1ec
ffffd000`2663f960 fffff800`cc10d25c : 00000000`009ef2b8 00000000`00000000 00000000`009ef2e0 00000000`009ef2d0 : nt!IopCreateFile+0x38c
ffffd000`2663fa00 fffff800`cbde3363 : 00000000`00000102 00000000`00000001 00000000`00000001 00000000`00000000 : nt!NtOpenFile+0x58
ffffd000`2663fa90 00007fff`be6e382a : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiSystemServiceCopyEnd+0x13
00000000`009ef268 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : 0x00007fff`be6e382a


STACK_COMMAND:  kb

FOLLOWUP_IP: 
nt!ObQueryNameStringMode+5f
fffff800`cc121c8f 410fb64618      movzx   eax,byte ptr [r14+18h]

SYMBOL_STACK_INDEX:  4

SYMBOL_NAME:  nt!ObQueryNameStringMode+5f

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: nt

IMAGE_NAME:  ntkrnlmp.exe

DEBUG_FLR_IMAGE_TIMESTAMP:  55c9bcb6

IMAGE_VERSION:  10.0.10240.16431

BUCKET_ID_FUNC_OFFSET:  5f

FAILURE_BUCKET_ID:  AV_nt!ObQueryNameStringMode

BUCKET_ID:  AV_nt!ObQueryNameStringMode

ANALYSIS_SOURCE:  KM

FAILURE_ID_HASH_STRING:  km:av_nt!obquerynamestringmode

FAILURE_ID_HASH:  {9eb41a12-81ba-71f6-0c3d-31180b493b51}

Followup: MachineOwner
---------

DokanUnmount() always fails

I have not been able to find a way to call DokanUnmount() such that it actually succeeds. Not only that but dokanctl.exe /u M also fails. The only way I can unmount the drive is by executing dokanctl.exe /u M /f however DokanMain() still doesn’t return and additional calls to DokanUnmount() also fail.

I am running a console application and DokanMain() is being called on its own thread with DOKAN_OPTION_KEEP_ALIVE | DOKAN_OPTION_DEBUG.

C example

Is there a C example somewhere because i would like to port dokan in another high-level language but i can’t find example :/

thanks

BSOD while debugging .NET mirror sample

This is on Dokan 0.7.4.
I’d be happy to provide further details — if I had access to the 0.7.4 pdb.

Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:WindowsMEMORY.DMP]
Kernel Bitmap Dump File: Full address space is available

************* Symbol Path validation summary **************
Response Time (ms) Location
Deferred SRV_C:Windowssymbol_cache_http://msdl.microsoft.com/download/symbols
Symbol search path is: SRV_C:Windowssymbol_cache_http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 8 Kernel Version 9600 MP (8 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 9600.17936.amd64fre.winblue_ltsb.150715-0840
Machine Name:
Kernel base = 0xfffff802a3a06000 PsLoadedModuleList = 0xfffff802a3cdb7b0
Debug session time: Fri Sep 4 19:35:30.194 2015 (UTC + 2:00)
System Uptime: 0 days 0:12:38.930
Loading Kernel Symbols
………………………………………………………
……………………………………………………….
……………………………………………………….
…………..
Loading User Symbols

Loading unloaded module list
……….


Use !analyze -v to get detailed debugging information.

BugCheck 7E, {ffffffffc0000005, fffff802a3a94cb9, ffffd000219c86b8, ffffd000219c7ec0}

*** ERROR: Module load completed but symbols could not be loaded for dokan.sys
Probably caused by : dokan.sys ( dokan+2523 )

Followup: MachineOwner

4: kd> !analyze -v


SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000005, The exception code that was not handled
Arg2: fffff802a3a94cb9, The address that the exception occurred at
Arg3: ffffd000219c86b8, Exception Record Address
Arg4: ffffd000219c7ec0, Context Record Address

Debugging Details:

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 — The instruction at 0x%08l referenced memory at 0x%08lx. The memory could not be «%s».

FAULTING_IP:
nt!IopfCompleteRequest+a69
fffff802`a3a94cb9 488b4018 mov rax,qword ptr [rax+18h]

EXCEPTION_RECORD: ffffd000219c86b8 — (.exr 0xffffd000219c86b8)
ExceptionAddress: fffff802a3a94cb9 (nt!IopfCompleteRequest+0x0000000000000a69)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000019
Attempt to read from address 0000000000000019

CONTEXT: ffffd000219c7ec0 — (.cxr 0xffffd000219c7ec0;r)
rax=0000000000000001 rbx=ffffe00158824350 rcx=0000000000000884
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000001
rip=fffff802a3a94cb9 rsp=ffffd000219c88f0 rbp=ffffd000219c89f0
r8=0000000000000001 r9=ffffe00158888800 r10=fffff801e9674280
r11=ffffd000219c8a28 r12=00000000a000000c r13=0000000000000000
r14=ffffe00158836f00 r15=00000000a0000003
iopl=0 nv up ei pl nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010202
nt!IopfCompleteRequest+0xa69:
fffff802a3a94cb9 488b4018 mov rax,qword ptr [rax+18h] ds:002b:0000000000000019=????????????????
Last set context:
rax=0000000000000001 rbx=ffffe00158824350 rcx=0000000000000884
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000001
rip=fffff802a3a94cb9 rsp=ffffd000219c88f0 rbp=ffffd000219c89f0
r8=0000000000000001 r9=ffffe00158888800 r10=fffff801e9674280
r11=ffffd000219c8a28 r12=00000000a000000c r13=0000000000000000
r14=ffffe00158836f00 r15=00000000a0000003
iopl=0 nv up ei pl nz na pe nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010202
nt!IopfCompleteRequest+0xa69:
fffff802a3a94cb9 488b4018 mov rax,qword ptr [rax+18h] ds:002b:0000000000000019=????????????????
Resetting default scope

PROCESS_NAME: System

CURRENT_IRQL: 0

ERROR_CODE: (NTSTATUS) 0xc0000005 — The instruction at 0x%08l referenced memory at 0x%08lx. The memory could not be «%s».

EXCEPTION_PARAMETER1: 0000000000000000

EXCEPTION_PARAMETER2: 0000000000000019

READ_ADDRESS: unable to get nt!MmNonPagedPoolStart
unable to get nt!MmSizeOfNonPagedPoolInBytes
0000000000000019

FOLLOWUP_IP:
dokan+2523
fffff801`e966e523 4883c428 add rsp,28h

BUGCHECK_STR: AV

DEFAULT_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE

ANALYSIS_VERSION: 6.3.9600.17336 (debuggers(dbg).150226-1500) amd64fre

LAST_CONTROL_TRANSFER: from fffff801e966e523 to fffff802a3a94cb9

STACK_TEXT:
ffffd000219c88f0 fffff801e966e523 : ffffe00158824350 fffff802a3e60900 ffffe001627b53d0 ffffe00158836ef0 : nt!IopfCompleteRequest+0xa69
ffffd000219c8a30 fffff801e9671244 : ffffe00157496540 ffffe00158837da0 ffffe00158836f68 ffffe00158836e30 : dokan+0x2523
ffffd000219c8a60 fffff801e9670b7e : ffffe00158836f68 ffffe00158837da0 ffffe00158836e30 ffffe00158836f68 : dokan+0x5244
ffffd000219c8aa0 fffff801e9671d6c : ffffe0015fd9c0b0 ffffe00158837da0 ffffe00158836e30 ffffe00100000002 : dokan+0x4b7e
ffffd000219c8af0 fffff801e96719d1 : fffffffffffe7960 0000000000000001 0000000000000080 ffffe00158837da8 : dokan+0x5d6c
ffffd000219c8b30 fffff801e9671c4e : ffffe00158837da0 0000000000000000 ffffe00157309801 0000000000000000 : dokan+0x59d1
ffffd000219c8b60 fffff802a3b040a8 : 0000000000000000 ffffe00158834080 ffffe00158834080 0000000000000000 : dokan+0x5c4e
ffffd000219c8c00 fffff802a3b5bfc6 : ffffd0012f0a7180 ffffe00158834080 ffffd0012f0b33c0 fffff802a3a9fd28 : nt!PspSystemThreadStartup+0x58
ffffd000219c8c60 0000000000000000 : ffffd000219c9000 ffffd000219c3000 0000000000000000 0000000000000000 : nt!KiStartSystemThread+0x16

SYMBOL_STACK_INDEX: 1

SYMBOL_NAME: dokan+2523

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: dokan

IMAGE_NAME: dokan.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 55d73d9a

STACK_COMMAND: .cxr 0xffffd000219c7ec0 ; kb

FAILURE_BUCKET_ID: AV_dokan+2523

BUCKET_ID: AV_dokan+2523

ANALYSIS_SOURCE: KM

FAILURE_ID_HASH_STRING: km:av_dokan+2523

FAILURE_ID_HASH: {9d91f95c-aa94-4f23-2d77-0f802f2a29b4}

Followup: MachineOwner

Build instructions — need help

Hello,

I hope this finds you well, in good spirit and having a good day.

I would like to start helping with the Dokany project, if I can.

However because my experience is mostly from Linux/GNU programming, I would need help to get started with the Visual Studio, please.

I created a Windows Server 2008 R2 virtual machine, and installed Visual Studio 2013 Express for Desktop with the WDK 8.1 as written on:

https://github.com/dokan-dev/dokany/wiki/Build

But I do not understand or find how to do this:

«On VS menu, select Generate => Background Configuration then check all Win32/x64 Release configuration and click on Generate.»

My friend who has worked with Visual Studio before could not tell me what does it mean either.

I did give him remote desktop access to the box, and he tried to build it, but it said 4 succeed 2 failed, and that it built dokan.dll but could not find dokan.lib.

It would be great if you can help me get started with this, as I hope I can then be able to get into it and help to fix things in the future.

Has anyone been able to build it according to the Build page instructions out of the box?

Sorry for the ‘newbie’-ish issue, but once I get over it, hopefully I can get cracking!

Further advice and clarification would be great.

With best wishes,

Kalle.

Problems with file mapping

Hello everybody!
There are several bugs with memory-mapped files:

  1. Wrong behaviour in MirrorWriteFile:
    If a «Write» request comes from Virtual Memory Manager ( DOKAN_PAGING_IO is set ) then a file size will must not to be changed.
    For example:
    h = CreateFile(…)
    MapWrite( h, data = «Hello World» )
    CloseFile(h)
    After that the file size is equal to 4K( page size ) although the file size should be equal to 11 bytes
    Try to use this code:
   static int DOKAN_CALLBACK MirrorWriteFile( ... )
   {
       ...

       FileSize = GetFileSize(...);
       LARGE_INTEGER distanceToMove;

       if ( DokanFileInfo->WriteToEndOfFile )
       {
           if( DokanFileInfo->PagingIo )
            {
                *NumberOfBytesWritten = 0;
                return 0;
            }
            LARGE_INTEGER z;
            z.QuadPart = 0;
            if ( !SetFilePointerEx( handle, z, NULL, FILE_END ) )
            {
                 DbgPrint(L"tseek error, offset = EOF, error = %dn", GetLastError());
                 return -1;
            }
        }
        else
        {
            if( DokanFileInfo->PagingIo  )
            {
                if( Offset >= FileSize )
                {
                    return 0;
                }

                if( ( Offset + NumberOfBytesToWrite ) > fi.FileSize )
                {
                    NumberOfBytesToWrite = fi.FileSize - Offset;
                }
            }

            if( Offset > fi.FileSize )
            {
                //In the mirror sample helperZeroFileData is not necessary. NTFS will zero a hole.
                //But if user's file system is different from NTFS( or other Windows's file systems ) then  users will have to zero the hole themselves.
                err = helperZeroFileData( ... );
                if( err )
                {
                    return -1;
                }
            }

            distanceToMove.QuadPart = Offset;
            if ( !SetFilePointerEx( handle, distanceToMove, NULL, FILE_BEGIN ) )
            {
               DbgPrint(L"tseek error, offset = %d, error = %dn", offset, GetLastError());
                return -1;
            }
        }

        ...
    }

  1. Wrong behaviour in driver’s DokanDispatchWrite, DokanDispatchRead, DokanDispatchSetInformation( set EOF ):
    Previous mapped files are not flushed in DokanDispatchWrite, DokanDispatchRead. Also they are not invalidated in DokanDispatchWrite, DokanDispatchSetInformation.
    For example:
    h = CreateFile(…)
    MapWrite( h, offset = 0x100, length = 0x10, data = 0xaa )
    WriteFile( h, offset = 0x100, length = 0x10, data = 0x00 )
    MapRead( h, offset = 0x100, length = 0x10, buffer )
    After MapRead buffer will not contain zero data

    Try to use:

NTSTATUS DokanDispatchRead( ... )
{
    ...
    if (fcb->Flags & DOKAN_FILE_DIRECTORY)
    {
        DDbgPrint("   DOKAN_FILE_DIRECTORY %pn", fcb);
        status = STATUS_INVALID_PARAMETER;
        __leave;
    }

    if (Irp->Flags & IRP_PAGING_IO) 
    {
        isPagingIo = TRUE;
    }

    if(
          !isPagingIo &&
          ( fileObject->SectionObjectPointer != NULL ) &&
          ( fileObject->SectionObjectPointer->DataSectionObject != NULL )
      )
    {
       ExAcquireResourceExclusiveLite( &fcb->PagingIoResource, TRUE );
       CcFlushCache(
                    &fcb->SectionObjectPointers,
                    &irpSp->Parameters.Read.ByteOffset,
                    irpSp->Parameters.Read.Length,
                    NULL
                   );
         ExReleaseResourceLite( &fcb->PagingIoResource );
    }
    ...
}

NTSTATUS DokanDispatchWrite( ... )
{
    ...
    if (Irp->Flags & IRP_PAGING_IO) 
    {
        isPagingIo = TRUE;
    }

    if(
          !isPagingIo &&
          ( fileObject->SectionObjectPointer != NULL ) &&
          ( fileObject->SectionObjectPointer->DataSectionObject != NULL )
      )
    {
       ExAcquireResourceExclusiveLite( &fcb->PagingIoResource, TRUE );
       CcFlushCache(
                    &fcb->SectionObjectPointers,
                    writeToEoF ? NULL : &irpSp->Parameters.Write.ByteOffset,
                    irpSp->Parameters.Write.Length,
                    NULL
                   );
        CcPurgeCacheSection(
                   &fcb->SectionObjectPointers,
                   writeToEoF ? NULL : &irpSp->Parameters.Write.ByteOffset,
                   irpSp->Parameters.Write.Length,
                   FALSE
                  );
         ExReleaseResourceLite( &fcb->PagingIoResource );
    }
    ...
}

NTSTATUS DokanDispatchSetInformation( ... )
{
    ...
    switch (irpSp->Parameters.SetFile.FileInformationClass)
    {
        ...
    case FileEndOfFileInformation:
        if( 
            ( fileObject->SectionObjectPointer != NULL ) &&
            ( fileObject->SectionObjectPointer->DataSectionObject != NULL )
          )
        {
            ExAcquireResourceExclusiveLite(&fcb->Resource, TRUE);

            pInfoEoF = (PFILE_END_OF_FILE_INFORMATION)buffer;
            //Not truncate an image file if it has been already mapped
            if (!MmCanFileBeTruncated( fileObject->SectionObjectPointer, &pInfoEoF->EndOfFile ) )
            {
                status = STATUS_USER_MAPPED_FILE;
                __leave;
            }

            ExReleaseResourceLite(&fcb->Resource);

            //Real file size is in an user mode app. So flush and invalidate a whole region
            if( !isPagingIo )
            {
                ExAcquireResourceExclusiveLite( &fcb->PagingIoResource, TRUE );
                CcFlushCache(&fcb->SectionObjectPointers, NULL, 0, NULL);
                CcPurgeCacheSection(&fcb->SectionObjectPointers, NULL, 0, FALSE);
                ExReleaseResourceLite( &fcb->PagingIoResource );
             }
        }
        ...
    }
    ...
}

Future changes (TODO)

For fixing some issue and becoming more stable, Dokan need

  • KeepAlive no longer a option.
  • Use NTSTATUS for interface functions — For now: LONG = NTSTATUS * -1 — Will break compatiblity
  • Use LookasideList
  • Merge DriverEntry (catch all exception in one place like cdfs) #55
  • SectionObjectPointers have the information about Memory Manager and if the file is memory mapped. But we need to implement it in a clean way. see #32
  • Add Oplock Semantics
  • Change EnumerateNamedStreams to work like FindFiles
  • Change Dokan Mount Service by Microsoft Mount Manager (requires Plug & Play) see #50
  • Read-only device option #72
  • CreateFile SL_CASE_SENSITIVE, SL_FORCE_ACCESS_CHECK, SL_OPEN_PAGING_FILE are not currently handled at all. #99
  • Add option for normal user to mount device as Global
  • Disable network device when mount point folder is specified

SetFileSecurity with inheritance

Hello,
Did anybody else encounter a problem with setting access rules with inheritance on a folder?
I tried to set the following SDDL — O:BAG:BAD:PAI(A;OICI;FA;;;WD)
which means —

Owner: Administrators
Group: Administrators
Rights: Everyone - Full Control
        For all subfolders

When I check the security settings on the folder, I see that they apply only for the current folder.

I tried to check if it works in the Mirror project, but the security tab doesn’t show up in the mirrored drive. Probably because it works with the future version of Dokan, and not 0.7.4.

Thanks!

Cooperation with Project Cameleonica

3a

I should mention that me being active in this project is not entirely without self interest. I started a prototype project for a radically new, versatile filesystem called Cameleonica. If it gains traction then dokan will be of interest to me.

I would like to establish some official cooperation between our endeavors. I submitted a heavy set of changes to your wiki, code comments, and io site. I am happy to see that you accepted them.

https://github.com/arekbulski/Cameleonica/blob/master/README.md

I am looking forward to having people review my ideas, especially from people that are not technical in this topic. Having external perspective is always helpful. If you would spend some time to read it, please post an Issue with your questions and remarks. I am looking forward to answering them.

DokanFreeFCB has potential race condition issues.

originally, dokan.sys [6.0.0] source code had a race condition issues as follows :


NTSTATUS
DokanFreeFCB(
  __in PDokanFCB Fcb
  )
{
        // sth is omitted ...

    Fcb->FileCount--;  // here!!

    if (Fcb->FileCount == 0) {  // and here!!

        RemoveEntryList(&Fcb->NextFCB);

current dokan.sys is fixed as follows :


NTSTATUS
DokanFreeFCB(
  __in PDokanFCB Fcb
  )
{
    PDokanVCB vcb;

        // sth is omitted...

    InterlockedDecrement(&Fcb->FileCount);  // fixed code...

    if (Fcb->FileCount == 0) {

        RemoveEntryList(&Fcb->NextFCB);

I think current code is much better… but not perfect.
there is still race condition issue between InterlockedDecrement and if statement.
If multiple threads execute «InterlockedDecrement(&Fcb->FileCount);» statement at the same time, above code is risk that no thread enter «if (Fcb->FileCount == 0)» block.

It should be fixed as follows :


NTSTATUS
DokanFreeFCB(
  __in PDokanFCB Fcb
  )
{
    LONG        FileCount = 0;
    // sth is omitted...

    FileCount = InterlockedDecrement(&Fcb->FileCount);      // should be fixed like this!!

    if (FileCount == 0) {

        RemoveEntryList(&Fcb->NextFCB);

According to the above code, even if multiple thread enter DokanFreeFCB at the same time, only (and at least) one thread will enter «if (FileCount == 0)» block.

Use IoRegisterFileSystem

Possible race conditions in mirror.c sample.

I am trying to make my own fs using mirror.c sample as a basis, but it seems to me that there will be race conditions if multiple threads will be accessing it concurrently.
For example in the MirrorCleanup there is such code:

        CloseHandle((HANDLE)DokanFileInfo->Context);
        DokanFileInfo->Context = 0;

        if (DokanFileInfo->DeleteOnClose) {
            DbgPrint(L"tDeleteOnClosen");
            if (DokanFileInfo->IsDirectory) {
                DbgPrint(L"  DeleteDirectory ");
                if (!RemoveDirectory(filePath)) {
                    DbgPrint(L"error code = %dnn", GetLastError());
                } else {
                    DbgPrint(L"successnn");
                }
            } else {
                DbgPrint(L"  DeleteFile ");
                if (DeleteFile(filePath) == 0) {
                    DbgPrint(L" error code = %dnn", GetLastError());
                } else {
                    DbgPrint(L"successnn");
                }
            }
        }

But wouldn’t it be possible that after CloseHandle another thread will delete this file, and create new file in it’s place?
Similar problem seems to be in MirrorDeleteDirectory function, that function is checking that the directory being deleted is empty, but what if new file will be created after this check but before directory really will be deleted?

Also in multiple functions there is code similar to this:

    if (!handle || handle == INVALID_HANDLE_VALUE) {
        DbgPrint(L"tinvalid handle, cleanuped?n");
        handle = CreateFile(
            filePath,
            GENERIC_READ,
            FILE_SHARE_READ,
            NULL,
            OPEN_EXISTING,
            0,
            NULL);
        if (handle == INVALID_HANDLE_VALUE) {
            DbgPrint(L"tCreateFile error : %dnn", GetLastError());
            return -1;
        }
        opened = TRUE;
    }

But in what cases can you get invalid handle sent to your function? And is it really okay to just reopen file here?

Maybe I am missing something?

SetFileTime DateTime? not updated in samples

I am not experienced in C#, but if I try to compile the dokan_net samples from the latest release 0.7.1 in VS 2013 it doesnt work.
SetFileTime DateTime? change from the last update seems to be one of the problems.

Mount Manager

Mount Manager is no longer an option on current Windows OS.
This issue to discuss/tracks changes on mountmanager branch to support it correctly on Dokan.

  • PnP support: this would be great of course but doesn’t seem mandatory. Non-pnp device can notify mount manager with IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION (see DokanSendVolumeArrivalNotification). Also, PnP should be an option on DokanOptions for users who doesn’t want their File System to be PnP.
  • Volume Links: the way Volume Links (??Volume{x} and DosDeviceM) are created is wrong. Mount Manager take care about the first one following IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION and the second one should be created with IOCTL_MOUNTMGR_CREATE_POINT. Ideally the driver shouldn’t have to be aware of volume link names.
  • IoRegisterFileSystem: For details, see previous discussion on #48.
  • Recycle Bin: mounting correctly the volume will require to support high level feature like Recycle Bin (currently end up to a corrupted recycled bin each time the volume is mounted).
  • Remove dokan mount service

Installing from source instructions

Hi.

This is 50% question 50% feature request. :) I promise that if I get the first 50% I’ll send a pull request updating the docs.

I failed to install the driver by following the instructions coming from the original dokan repository. I compiled the project just fine by opening the solution in Visual Studio, but running «dokanctl.exe /i d» got me just an error. I ran with DebugView, and the error was:

[1912] Service (Dokan) installed
[1912] failed to start service (Dokan): 1275
[1912] Service (Dokan) start failed

Seems this error code is ERROR_DRIVER_BLOCKED («This driver has been blocked from loading.»). This isn’t very helpful, and what I’ve found searching wasn’t helpful either.

I ran the installer that you provide (thank you!) and it works. From the log it prints, I see it does more or less the same, so I don’t know what could be different.

In a previous setup I got it to work, but it was the original dokan on Vista with WDK 7. Now it’s Windows 8 with WDK 8 and dokany.

If you have any hints I would be very grateful, since I am going to use extensively some Dokan implementation, and being able to run something I’ve built myself could be quite important.

Thank you.

The directory name is invalid

I have modified the .net RegistoryFS sample the GetFileInformation method to return an information if the key ends with temp

          if (filename.EndsWith("TEMP"))
            {
                fileinfo.Attributes = System.IO.FileAttributes.ReadOnly;
                fileinfo.LastAccessTime = DateTime.Now;
                fileinfo.LastWriteTime = DateTime.Now;
                fileinfo.CreationTime = DateTime.Now;
                return 0;
            }

Then I have executed the test and navigated to CurrentUserEnvironment and made a double click on the TEMP entry. Windows 7 x64 brings up a message «The directory name is invalid»

Have you an idea why?

The whole example is build to return GetFileInformation only if it is a directory, otherwise it returns -1

WS 2008 R2 64bit MSVCR120.dll

I have tried 0.7.1 and 0.7.2, but both return only that MSVCR120.dll is missing. What I have to install additionally?

mirror causes blue screen on 64-bit Windows7 on ctrl-c when trying to dismount

I recently published an interface to mount the ipfs distributed file system as a Windows drive via dokan:

https://github.com/alexpmorris/dipfs

Using the version of dokan 0.6.0 included in my repo, it works perfectly on 32-bit Windows, as well as 64-bit Windows 7.

I wanted to see if your updated dokany version would work as well, and while it worked as expected throughout operation, when I hit ctrl-C to kill the program (which should also dismount the drive), the PC immediately blue-screened each time.

At first I thought it was something I did wrong, but then I tried your version of mirror.exe, and the same bluescreen occurred when I tried to close down mirror.exe as well. This happened with both dokany version 0.7.2 and 0.7.3-rc2.

If it would help, I can send a minidump. But basically, it shows:

dokan.sys+2a00 PAGE_FAULT_IN_NONPAGED_AREA

dokanctl.exe doesn’t write to STDOUT. Output can’t be read.

For example, try dokanct.exe /v to get the version number

There’s a milliseconds flash of a window on my screen but nothing else.

If I’m reading the source correctly, with ARGV<3 it should display usage… which also flashes up too fast to read.

Same issue with the other .exe files as well?

Do the .NET bindings for Dokan still work?

I don’t see them in the repo.

Second callback: Ioctl error 6

I’m currently trying to build a java wrapper for dokan with BridJ, but the second callback always fails with ERROR_INVALID_HANDLE. This is the debug output:

[4472] Dokan: debug mode on
[4472] device opened
[4472] mounted: D: -> DokanRedirector{d6cc17c5-1710-4085-bce7-964f1e9f5de9}
[4472] ###Create 0000
[4472]    CreateDisposition 108X
[4472] CreateFile status = 0
[4472] Ioctl failed with code 6

Increasing the number of threads to 3 yields the following:

[5348] Dokan: debug mode on
[5348] device opened
[5348] mounted: D: -> DokanRedirector{d6cc17c5-1709-4085-bce7-964f1e9f5de9}
[5348] ###Create 0000
[5348]    CreateDisposition 108X
[5348] CreateFile status = -2
[5348] Ioctl failed with code 6
[5348] ###Create 0001
[5348]    CreateDisposition 108X
[5348] CreateFile status = -2
[5348] Ioctl failed with code 6
[5348] ###Create 0002
[5348]    CreateDisposition 108X
[5348] CreateFile status = -2
[5348] Ioctl failed with code 6

What could be the cause of this problem? Locked resources? I would appreciate any hints. I’m a Java developer and really not into drivers / windows / C.

I extracted some code to illustrate the issue: https://github.com/sherter/dokan4j
Use gradlew run to run the main function in Test.java. If you have eclipse installed, you can use gradlew eclipse to generate eclipse project metadata. Afterwords you can import it in eclipse as existing project. Let me know if you have any problems running the code.

Installer doesn’t work on Windows Vista

Hi.

According to a message from Maxime, and the Unsupported wiki page, Vista is supported, but the installer refuses to continue in it. I still have an ancient machine that I would like to use to test my app. If you could change the installer to allow installations on Vista, I would again be very thankful. :)

BSOD with Dokan 0.7.3 RC on Windows 8.1 Pro x64

Hello,

I use Dokan 0.7.3 RC (latest) for FISSH on Windows 8.1 Pro x64.

I have BSOD everytime I shutdown the computer.
If I uninstall Dokan, the BSOD dissapears.

Is there à fix for this?

Thanks.

Insufficient system resources exist to complete the requested service

When copying large files I receive «Insufficient system resources exist to complete the requested service» during the copy. The filesystem I am writing uses cloud storage on the backend so is pretty slow. It seems to fail to get memory with «AllocateEventContext» not sure why but it seems to be out of memory at that point.
When the writes are fast this error does not occur.

Cannot Unmount with DokanCtl.exe on Windows 8.1

I have a 64-bit Windows 8.1 system. After mounting a drive (say I mount it to F:), I cannot unmount it with DokanCtl.exe /u F or DokanCtl.exe /u F:. It will say that the mounter is Dokan’s mounter.exe, path is Dokan’s SYS file and Unmount status: 0.

I use Dokany with this application: https://cuemounter.codeplex.com/, so I’m not sure it is a Dokan issue.

Please look into it.

VLC doesn’t play video with Dokan

used in encfs4win — mounted drive not indexable by windows search

Hi, dokan/dokany is used in encfs4win but there is a problem: the mounted drive is not seen by indexing service of windows so its content is not fast-searchable.
I don’t know if it is a limit of how encfs4win uses dokany or it is not yet a supported feature of dokany, in the latter case this issue is to possibly ask for it.
cheers

Giuse

Fix trailing backslash in path of GetFileInformation()/OpenDirectory() call during SetAccessControl()

When calling SetAccessControl() on a DirectoryInfo instance in C# the call sequence executed on a mounted IDokanOperationsProxy contains several calls with a redundant trailing backslash character:

OpenDirectory («Dir***«, …)
GetFileInformation («Dir***
«,…)
Cleanup («Dir***«, …)
CloseFile («Dir***
«, …)

This is the only known case where dokany calls the IDokanOperationsProxy with a trailing backslash in the filename (actually a directory name). Even in the same call sequence all other methods use the directory name without the trailing slash.
Please change the call pattern so that all file/directory paths are consistently named without a trailing backslash — with the exception of the root directory path .

See below for the full call sequence taken from a trace of the test DirectoryInfoTest.SetAccessControl_CallsApiCorrectly() in the DokanNet.Tests project.
Relevant filenames are emphasized in bold.

CreateFile[1] («», ..)
GetFileInformation[1] («», …)
Cleanup[1] («», …)
CloseFile[0] («», …)
CreateFile[1] («Dir», …)
GetFileInformation[1] («Dir», …)
CreateFile[2] («», …)
GetFileInformation[2] («», …)
GetFileSecurity[2] («», …)
Cleanup[2] («», …)
CloseFile[1] («», …)
GetFileInformation[1] («Dir», …)
GetFileSecurity[1] («Dir», …)
OpenDirectory[2] («Dir», …)
GetFileInformation[2] («Dir», …)
Cleanup[2] («Dir», …)
CloseFile[1] («Dir», …)
OpenDirectory[2] («Dir», …)
GetFileInformation[2] («Dir», …)
Cleanup[2] («Dir», …)
CloseFile[1] («Dir», …)
SetFileSecurity[1] («Dir», ..)
OpenDirectory[2] («Dir», ..)
GetFileInformation[2] («Dir», ..)
Cleanup[2] («Dir», …)
CloseFile[1] («Dir», …)
OpenDirectory[2] («Dir», …)
GetFileInformation[2] («Dir», …)
Cleanup[2] («Dir», …)
CloseFile[1] («Dir», …)
Cleanup[1] («Dir», …)
Waiting for closure (#1)
CloseFile[0] («Dir», …)

Add support for 64bit DLL

encfs4win — (encfs.cpp:141) error caught in getattr

Can’t get encfs4win ( http://members.ferrara.linux.it/freddy77/encfs.html ) to work with dokany latest RC, with administrator user it works almost fine but with an usual user it outputs (encfs.cpp:141) error caught in getattr error for every directory listing or file access attempt (and it won’t open any files — gives «file not found» error). (folders open fine)

same error is given even when run as administrator when encrypted file is attempted to be deleted — so delete doesn’t work but modify does

Is this fixable from dokany?

*running in reverse mode: "C:Program Files (x86)Dokanencfs4winencfs.exe" --reverse -f C:test X: (same with local folders as mount-point)
Windows10 10240

dokan.sys install failed in WS 2008 R2 x64

I compiled dokan in vs 2013 (wdk 8.1), and signed it, but dokan.sys driver install failed always.

Clarifying statements

I found 2 issues on the API wiki page that is unclear to me. If you would please explain, I will edit the wiki accordingly.

  • FindFiles is supposed to return all directory entries for further filtering by dokan library? And is filtering entries prohibited in there?
  • Mountpoint option «MountPoint» is supposed to demand that if C:… path is provided then C: must necessarily be using NTFS? Back in the old days, C drive could have been using FAT32.

Futher questions regarding comments in the code:

  • https://github.com/arekbulski/dokany/blob/master/dokan/dokan.h#L322

    What the hell is CreateDirectly…

Implementing volume Icon change Helper

Hello,
I was wondering if it’s possible to implement missing features, such as InstallIcon() and SetIcon() for changing the disk’s icon.

Dokan vs. CBFS

Thanks!

Thumbs.db & Desktop.ini

The OS doesn’t create those files on a Dokan drive.
Is it because of how the dokan drive is built? Is it the same reason the dokan drive doesn’t have a recycle bin?

Thanks!

Allocation Unit Size

Hi!

I tried changing:

#define DOKAN_ALLOCATION_UNIT_SIZE  512

in public.h to 4096, and after I compiled and installed the dokan driver, the allocation size is still 512.

I tested it by creating a new txt file with just a couple of letters in it.
The size on disk appeared to be 512 bytes.

Thanks!

dokany exporting c++ decorated function names

I use dynamic load in my app and notice that dokany does not export functions as original dokan did.
Only when modifying my loader function I can load it

static bool load_dokan ()
{
    HMODULE hmod = LoadLibrary("dokan");

#if DOKAN_VERSION == 600 // original dokan
    dllDokanMain = (tDokanMain) GetProcAddress (hmod, "DokanMain");
    dllDokanVersion = (tDokanVersion) GetProcAddress (hmod, "DokanVersion");
    dllDokanDriverVersion = (tDokanDriverVersion) GetProcAddress (hmod, "DokanDriverVersion");
#else // dokany
    dllDokanMain = (tDokanMain) GetProcAddress (hmod, "[email protected]");
    dllDokanVersion = (tDokanVersion) GetProcAddress (hmod, "[email protected]");
    dllDokanDriverVersion = (tDokanDriverVersion) GetProcAddress (hmod, "[email protected]");
#endif

dokanctl fails to install services (Main device file not found)

Hi.

In some circumstances, we can’t get our application to work. DokanMain fails like this:

[3032] Dokan: debug mode on
[3032] Dokan Error: CreatFile Failed \.Dokan: 2
[3032] DokanMain completed with status -3
[3032] Can't install driver

The last two lines are the return value we get from DokanMain and the text in the dokan.h file next to the #define.

From what I see in the DokanMain code, that’s CreateFile returning ERROR_FILE_NOT_FOUND on the main driver device. What could cause this? Is there something that we can try to find out the issue? The installer worked fine, and gave no errors. What could be the reason theh device it’s not there?

Thank you.

PS: We are using DokanY 7.3 RC.

How to sign a Windows 64-bit driver

Hello Maxhy,

Sorry my lack of knowledge, I am starting at driver development. Would you mind to give me a brief explanation about, How you can sign a driver to work properly at Windows 64 bits enviroment ? Is there any company that does it for free ?

Thanks in advance.

installation ; signed driver required

Mountpoint to NTFS-Path don’t work

i tested .net sample and delphi sample. in both apps, i can’t mount to an empty ntfs-path like d:test

DokanMain retrn with DOKAN_MOUNT_POINT_ERROR

Place for DokanY discussion rather than «issues»?

I’ve been watching the progress of FUSE over Windows for years, and was sad when it seemed like Dokan had died on the vine. Thanks to everyone who has participated in it’s renovation, and especially for this fork.

Once in a while I have questions about the software but would rather not clutter this Git Issue Tracker with them. Is there a forum somewhere or other location where people are discussing it? Thanks!

Install FUSE headers alongside rest

I made a fork of mafintosh/fuse-bindings to add support for Windows using the FUSE API of this repo. It’s available at raymond-h/fuse-bindings.

It works, however at the moment, you need to both install Dokany for binary files, and clone the repo for the dokan-fuse headers.

It’d be great if the dokan-fuse headers were bundled with the install as well.

DeleteOnClose vs FILE_FLAG_DELETE_ON_CLOSE

I’ve been puzzled by some hours after realizing that Windows Explorer on Windows 8 was removing files without actually ever calling the DeleteFile operation, nor receiving a Cleanup or Close operation with DeleteOnClose set.

I’ve found the explanations of the issue here:

  • https://groups.google.com/d/topic/dokan/s5RPnXREWD8/discussion
  • https://code.google.com/p/dokan/issues/detail?id=269

So it seems that since Windows 8 there is another way to delete files, and is opening them with FILE_FLAG_DELETE_ON_CLOSE in the dwFlagsAndAttributes parameter of CreateFile. Dokan doesn’t support that out of the box, but there are easy to work around.

  1. Keep in the application the state of that flag from CreateFile to Cleanup, and remember to delete the file even if DeleteOnClose is not set in the DokanFileInfo structure. This is difficult on the file system application, and requires checking two flags for the same purpose, one coming from Dokan, other from the application itself.
  2. Check the flag on CreateFile in the application and set DeleteOnClose to TRUE appropiately. This is easy, but it didn’t work for me. Probably Dokan overwrites it, as the application is only supposed to write in the Context variable.
  3. Return an error in CreateFile if the flag is set. Windows Explorer will try to delete the file using DeleteFile as a fallback. This worked for me, but I don’t know if it’s the proper behaviour, and it could fail with other applications.

The other possibility is actually fixing it in Dokan, either by ensuring that workardound 2 can be done, or by setting DeleteOnClose like in the other cases.

If you think it should be done in the application, let me know, and I’ll update the documentation and close the issue.

Thank you!

Like this post? Please share to your friends:
  • Docker daemon is not running windows 10
  • Does not appear to contain cmakelists txt windows
  • Docx скачать бесплатно для windows 10 2020
  • Docx reader скачать на пк на русском для windows
  • Docker compose windows 10 mount volume