You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add to all callbacks SAL annotations to indicate the intent of pointer paramters.
Description
First of all, i'm not a c++ programmer, so I don't know if this makes sense or is even feasible.
This question arose to me during the migration fom Dokany 1.x to 2.x. Newer functions like DokanCloseHandle(...) are using SAL annotations to indicate the usage intent of function parameters and so, reduce misuse of them.
From my point of view, such annotations would be also benefical for the dokan callbacks, since it is not always clear, which parameter struct can and should be altered. Especially this holds for the DokanFileInfo struct, since this one cannot be looked up in any Windows documentation.
As an example, in the sample mirrorfs, in the dokanFileInfo struct the directory attribute is set:
Summary
Add to all callbacks SAL annotations to indicate the intent of pointer paramters.
Description
First of all, i'm not a c++ programmer, so I don't know if this makes sense or is even feasible.
This question arose to me during the migration fom Dokany 1.x to 2.x. Newer functions like DokanCloseHandle(...) are using SAL annotations to indicate the usage intent of function parameters and so, reduce misuse of them.
From my point of view, such annotations would be also benefical for the dokan callbacks, since it is not always clear, which parameter struct can and should be altered. Especially this holds for the DokanFileInfo struct, since this one cannot be looked up in any Windows documentation.
As an example, in the sample mirrorfs, in the dokanFileInfo struct the directory attribute is set:
dokany/samples/dokan_mirror/mirror.c
Lines 274 to 284 in 1ffacd4
I would assume the kernel driver is responsible for setting such attributes correctly, but it seems like we have to deal with it.
The text was updated successfully, but these errors were encountered: