BenjaminKim / dokanx

user-mode filesystem framework for Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Second callback: Ioctl error 6

sherter opened this issue · comments

I'm currently trying to build a java wrapper for dokan(x) 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

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.

[UPDATE]
This seems to be a per-thread problem. 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

@sherter How can I reproduce this? And let me know what branch did you try.

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.

I'm actually using dokanY because of the driver signing issue (the latest release). I just noticed that dokanX has changed the callback function signature and uses C++ object types. So the code above will not work with dokanX. However, the issue might exist in dokanx as well. I would appreciate if you could have a look at it.

@sherter I don't know anything what dokany has changed. You had better ask it to dokany project repository.