Skip to content

[Code Quality] ProcessHelper + ProcessKiller — P/Invoke declarations duplicated verbatim #485

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Info

Files:

  • src/Servy.Core/Helpers/ProcessHelper.cs
  • src/Servy.Core/Helpers/ProcessKiller.cs

Description:
Both files independently declare identical P/Invoke signatures and structs for CreateToolhelp32Snapshot, Process32First, Process32Next, CloseHandle, and PROCESSENTRY32. Any struct layout or calling-convention fix must be applied in two places — changes to one do not propagate to the other.

Suggested fix:
Consolidate into a single shared ProcessSnapshot internal utility class or add these to the existing NativeMethods class.

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