Skip to content

[Feature] Unlock files by closing their handles with P/Invoke #5

Open
@BinToss

Description

@BinToss

This option can be more dangerous compared to telling a process to end and then waiting for it to end.

Personally, I prefer not closing processes that are locking a file, especially if one of them is the File Explorer desktop shell.
Instead, I typically use ProcessHacker to close the file handle.
Closing a handle held by another process is useful when that process is not responding to attempts to terminate it.

I'll be porting portions of ProcessHacker to .NET with the intention of using some of its features for other C#/.NET projects including its ability to close handles held by other processes.

I'll submit a pull request with this feature when I have a working example.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions