import { localize } from '../localize' ; import { getCoreNodeModule } from "./getCoreNodeModule" ; export function getWindowsProcessTree ( ) { const moduleName = 'windows-process-tree' ; const windowsProcessTree = getCoreNodeModule < IWindowsProcessTree > ( moduleName ) ; if ( ! windowsProcessTree ) { throw new Error ( localize ( 'noWindowsProcessTree' , 'Failed to find dependency "{0}".' , moduleName ) ) ; } return windowsProcessTree ; } export enum ProcessDataFlag { None = 0 , Memory = 1 , CommandLine = 2 } export interface IProcessInfo { pid : number ; ppid : number ; name : string ; /**
     * The working set size of the process, in bytes.
     */ memory ? : number ; /**
     * The string returned is at most 512 chars, strings exceeding this length are truncated.
     */ commandLine ? : string ; } export interface IWindowsProcessTree { param rootPid param callback param flags getProcessList ( rootPid , callback , flags ? ) : void ; }