dokan-dev / dokan-dotnet

Dokan DotNet Wrapper
http://dokan-dev.github.io
MIT License
462 stars 116 forks source link

AccessViolationException on TryResetTimeout with Dokan 2.0 #283

Closed pp111 closed 2 years ago

pp111 commented 2 years ago

Hi, I am testing my application with Dokan 2.0, after doing the changes documented to move from 1.0 to 2.0, it seems to be working fine except for the calls to:

info.TryResetTimeout(1000);

My application crashes with an AccessViolationException.

The mirror example does not use this method, so, to test it, I added this call to the mirror example, for example on ReadFile or CloseFile and the example crashes too.

It seems that there is something wrong with this method or something changed between V1 and V2

Liryna commented 2 years ago

Hi @pp111 ,

Thanks for the report!...you are right the DokanResetTimeout function was not migrated 😢 https://github.com/dokan-dev/dokany/commit/a22edf45d824788b3518cb458853f38eb78c6b87 fixes this issue. I will try to make a new release but in the meantime you will need to build the library if that's possible.

pp111 commented 2 years ago

Thank you for the fast fix!!! I'll wait for the new release.

Liryna commented 2 years ago

@pp111 please try with the new release https://github.com/dokan-dev/dokany/releases/tag/v2.0.2.1000

pp111 commented 2 years ago

Thank you, it is working fine now.

Also, just updating dokan2.dll and keeping the previous dokan2.sys driver also works fine.