Giter VIP home page Giter VIP logo

Comments (8)

Liryna avatar Liryna commented on August 30, 2024

Hi @TrabacchinLuigi ,

I got a couple of people requesting this features and I always propose to simply call DokanMain in a new thread but I am open to any proposition.

What kind of implementation for errors handling would your propose ?

from dokan-dotnet.

TrabacchinLuigi avatar TrabacchinLuigi commented on August 30, 2024

Not really sure how i don't work with unmanaged code that much...
I would like to just have DokanMain return if everythings goes right and have a HandleDokanError that get's called when docan is going down unexpectedly ... like someone unmounted your drive, or dokany become unavailable for some reason ...
I can share how i actually handle mounting and unmounting the mirror to show why it is a little annoying, also my implementation is disposable and unmount cleanly the disk before shutting down ...

from dokan-dotnet.

Liryna avatar Liryna commented on August 30, 2024

I would prefer to let DokanMain C as it is 😃
I was thinking to make async DokanMain by C# wrapper (Start thread, call event when return..)

I would be interested to see show this is annoying for you, yes.

from dokan-dotnet.

TrabacchinLuigi avatar TrabacchinLuigi commented on August 30, 2024

here we go: How i would write mirror.cs and use it

from dokan-dotnet.

TrabacchinLuigi avatar TrabacchinLuigi commented on August 30, 2024

The annoying part is i have to wait for a semaphore (line 69, that get's green when an exception is thrown during mount or when mounted get's called)... it's not that intuitive ...
Average users would not understand how to use it...
Average user want to do programmatically call like:

Using(var dokan = new DocanNetImplementation()) 
{ 
    dokan.Mount("C:\myfolder", "N:\"); // expect that when this call return N:\ is available
    System.IO.CreateFile("N:\myfile.txt");
}

from dokan-dotnet.

marinkobabic avatar marinkobabic commented on August 30, 2024

I think @TrabacchinLuigi is right. For the moment I would keep it like it is until the following issue has been implemented. dokan-dev/dokany#210

from dokan-dotnet.

Liryna avatar Liryna commented on August 30, 2024

@TrabacchinLuigi You made your point 👍
And @marinkobabic is right, this would be solved by issue dokan-dev/dokany#210
We would have DokanMain C return at the Mount.

It also mean that the DokanMain async will probably more be in 1.1.0 than in the next release.

from dokan-dotnet.

TrabacchinLuigi avatar TrabacchinLuigi commented on August 30, 2024

Great! keep up the good work!
i'll keep this open as a remainder!

from dokan-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.