public sealed record ProcessSnapshot : IEquatable<ProcessSnapshot> A process observed in a point-in-time Toolhelp snapshot.
Parameters
ProcessIdThe process identifier, which Windows may later reuse.
ParentProcessIdThe recorded parent identifier; its process may already have exited.
ExecutableNameThe executable filename reported by Toolhelp, not a full path.
Constructors
ProcessSnapshot
public ProcessSnapshot(int ProcessId, int ParentProcessId, string ExecutableName) A process observed in a point-in-time Toolhelp snapshot.
Parameters
ProcessIdThe process identifier, which Windows may later reuse.
ParentProcessIdThe recorded parent identifier; its process may already have exited.
ExecutableNameThe executable filename reported by Toolhelp, not a full path.
Properties
ExecutableName
public string ExecutableName { get; init; } The executable filename reported by Toolhelp, not a full path.
ImagePath
public string? ImagePath { get; init; } The full path of the executable image (QueryFullProcessImageNameW), such as C:\Program Files\App\app.exe; null when Windows denies access, as for some system and protected processes, or the process exited before it was read.
ParentProcessId
public int ParentProcessId { get; init; } The recorded parent identifier; its process may already have exited.
ProcessId
public int ProcessId { get; init; } The process identifier, which Windows may later reuse.