Closed Liryna closed 1 year ago
Hi @Liryna , can you maybe give me a hint? I can't get any further with the migration to Dokan 2. I think I did everything right with the new header file. But when I start my mirror.exe, DokanMain returns with error.
Dokan immediately prints "Unmount"
and DokanMain returns with
DOKAN_MOUNT_ERROR: Writeln(ErrOutput, 'Can''t assign a drive letter');
When I go back to version 1.4 everything works. Even if I use version 2 of the supplied mirror.exe, everything works. I have no idea right now. Also the kernel debug log of dokan2.dll didn't help me.
Startparameters are /R d:\test /L k:\ /D /S /O
branch: https://github.com/dokan-dev/dokan-delphi/tree/dev_2.0.6.1000
Thanks, Sven
Hi @landrix ,
Haven't found anything very obvious but:
DOKAN_VERSION = 206;
You can just set 200
VolumeSecurityDescriptor : array [0..VOLUME_SECURITY_DESCRIPTOR_MAX_SIZE-1] of WChar;
This should be Char type. Am not sure about the syntax 0..X-1
but the size of the array is VOLUME_SECURITY_DESCRIPTOR_MAX_SIZE * sizeof (CHAR)
DokanInit seems to be called correctly therefore it should not be that. There is really no logs at all printer by the library ?
@landrix hi Sven... I'm happy to help investigate as well. I'll have a look at the branch dev_2.0.6.1000
I spotted some differences on the entrypoints. I've raised https://github.com/dokan-dev/dokan-delphi/pull/10 But I'm still getting the same error as well... Can't assign a drive letter
I've found everything so far. A lot of pointer magic has changed in version 2. Thanks everyone, it's working for now. Now I have to check everything.
Well done @landrix
I agree with your approach with the latest commit to keep the core api as close to the C header as you have done by removing the 'var' and mapping onto the pointer types. Less chances of error that way. Embarcadero has done this a lot in the windows.pas, which has at times also prevented certain use cases such as when a parameter can take nil.
Thanks @darnocian for your help and @landrix for doing the migration to the v2! Good work!
Dokan 2.0.0 was just released 🥳 . There are a few changes in the API dokan.h and some logic described here that changed. It would be great if the wrapper could implement those changes! And of course, feel free to ping me if any questions or issues arise. Thanks in advance! 👍