Cotal TypeScript packages
    Preparing search index...

    Interface Win32ProcessBinding

    The shipped Windows binding. launch starts one process inside a new job that kills every member when its last handle closes and allows no breakaway; the job and the launched process stay held until this process exits, so a process launches at most once.

    interface Win32ProcessBinding {
        accounting(): { active: number; assigned: number; count: number };
        bootId(): number;
        creationToken(pid: number): string | undefined;
        drain(deadlineMs: number): "drained" | "timeout";
        inJob(pid: number): boolean | undefined;
        jobProcesses(): number[];
        launch(options: Win32JobLaunch): { pid: number; token: string };
        pinProcess(pid: number): Win32ProcessPin;
        processTree(pid: number, token: string): Win32TreePin[];
        rootExit(): number | undefined;
        systemId(): { id: string; source: number };
        terminate(code: number): void;
        userSid(): string;
    }
    Index
    • Exact retained-job accounting and complete native process-list counts.

      Returns { active: number; assigned: number; count: number }

    • Terminate this job and release root references, then require accounting/list zero by deadline.

      Parameters

      • deadlineMs: number

      Returns "drained" | "timeout"

    • Windows' system ID for this app's publisher, as hex, and its SystemIdentificationSource: 0 none, 1 TPM, 2 UEFI, 3 registry.

      Returns { id: string; source: number }