Skip to content

Delete the file in dokan #974

Answered by kyanha
zqlustc asked this question in Q&A
Feb 24, 2021 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

By the way...

    disposition = (irpSp->Parameters.Create.Options >> 24) & 0x000000ff;
    if (irpSp->Parameters.Create.Options & FILE_DELETE_ON_CLOSE) {
      status = STATUS_INVALID_PARAMETER;
      __leave;
    }

If you do this, then you will never be able to delete any file via the dokan driver that you compiled, because the file handle with the necessary permission and operation will never be opened, so it will never be closed and acted on.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@zqlustc
Comment options

@Liryna
Comment options

@zqlustc
Comment options

@Liryna
Comment options

@kyanha
Comment options

Comment options

You must be logged in to vote
1 reply
@zqlustc
Comment options

Answer selected by zqlustc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants