dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.23k stars 666 forks source link

dokan.sys unable to start #1174

Closed Lucasq11 closed 1 year ago

Lucasq11 commented 1 year ago

Environment

Check List

Description

I used vs2022 to compile dokan1.sys. here is the properties of sys: image

I followed the mannual installation (https://github.com/dokan-dev/dokany/wiki/Installation#manual-installation). First copy my dokan1.sys to C:\Windows\system32\driver, then using dokanctl to build, I got the err like this:

D065E420-5ADF-4B0B-ADE8-03364A1CB920

It seems that the installation is successful, however there's something wrong with starting Dokan1. The dokan version is 1.4.0.1000, I don't find any logs while having this err.

I also tried to install the release dokan1.sys of 1.4.0.1000 mannualy and it works:

0CAC8A08-7213-415D-AD33-FBC41F3D66B0

What could be wrong with my self-built driver?

Liryna commented 1 year ago

Hi @Lucasq11 ,

If you build the driver yourself you need to sign it or allow your system to load self signed drivers https://github.com/dokan-dev/dokany/wiki/How-to-Debug-Dokan#self-sign-build

Lucasq11 commented 1 year ago

Hi @Liryna I've tried this method, but it still says DokanServiceControl: Failed to start service (Dokan1). error = 127. Could that be some problems other than signing?

LTRData commented 1 year ago

Itt definitely sounds like another kind of problem. That error is The specified procedure could not be found. This could happen for example when you target a newer Windows version in your build and then try to load it on an older one where some functions may be missing.

Lucasq11 commented 1 year ago

Itt definitely sounds like another kind of problem. That error is The specified procedure could not be found. This could happen for example when you target a newer Windows version in your build and then try to load it on an older one where some functions may be missing.

The version of wdk that I used to build dokan1.sys is 10.0.22621.0, and the version of visual studio is 2022 community, the installation os is 19041.246. Is that to say wdk too new?

LTRData commented 1 year ago

It could be. Try an older version of the WDK. Preferably as close as possible to the OS version you are running on.

Lucasq11 commented 1 year ago

It works! My wdk version is not compitable with windows. in short vs2019+wdk10.0.19041.0 could build avaliable dokan driver for windows 19041.xx versions

It could be. Try an older version of the WDK. Preferably as close as possible to the OS version you are running on.

cowboy823 commented 3 months ago

Thank you for your help. But I have not solved my issue yet. My OS is Windows 10 Enterprise 22H2, OS build 19045.4529, I used VS 2022, WDK 10.0.22621 but still does not work. And That article is for Dokan1.0 I'm compilng dokany 2.0 Please check my issue again.

LTRData commented 3 months ago

Thank you for your help. But I have not solved my issue yet. My OS is Windows 10 Enterprise 22H2, OS build 19045.4529, I used VS 2022, WDK 10.0.22621 but still does not work. And That article is for Dokan1.0 I'm compilng dokany 2.0 Please check my issue again.

I would suggest that you try with Visual Studio 2019 and a Windows 10 version of the WDK, like how Lucasq11 got it solved earlier in this thread.