function __getObjectNameFormat(handle)
{
    if(handle.Type == "Process")
    {
        const eprocessObject = handle.Object.UnderlyingObject;
        const processImageFileNameAddress = eprocessObject.ImageFileName.targetLocation.address;
        const processImageFileName = host.memory.readString(eprocessObject.ImageFileName.targetLocation.address);
        const processId = eprocessObject.UniqueProcessId.address;
        return `${processImageFileName.toString()}(${parseInt(processId)})`;
    }
    else if(handle.Type.includes("Thread"))
    {
        const ethreadObject = handle.Object.UnderlyingObject;
        const tid = ethreadObject.Cid.UniqueThread;
        const pid = ethreadObject.Cid.UniqueProcess;
        return `TID ${parseInt(tid.address)} PID ${parseInt(pid.address)}`;
    }
    else if(handle.Type.includes("File"))
    {
        const fileObject = handle.Object.UnderlyingObject;
        return `${fileObject.FileName}`;
    }
    else if(handle.Type.includes("ALPC Port"))
    {
        const objectHeader = handle.Object;
        return objectHeader.ObjectName ? `${objectHeader.ObjectName}` : "";
    }
    else
    {
        return "";
    }
}
/**
    Get handle and return string representation of it's object name.

    Parameters:
        handle - WinDbg handle object
*/
Get handle and return string representation of it's object name.
Parameters:
handle - WinDbg handle object
Get handle and return string representation of it ' s object name . Parameters : handle - WinDbg handle object
function __getObjectNameFormat(handle)
{
    if(handle.Type == "Process")
    {
        const eprocessObject = handle.Object.UnderlyingObject;
        const processImageFileNameAddress = eprocessObject.ImageFileName.targetLocation.address;
        const processImageFileName = host.memory.readString(eprocessObject.ImageFileName.targetLocation.address);
        const processId = eprocessObject.UniqueProcessId.address;
        return `${processImageFileName.toString()}(${parseInt(processId)})`;
    }
    else if(handle.Type.includes("Thread"))
    {
        const ethreadObject = handle.Object.UnderlyingObject;
        const tid = ethreadObject.Cid.UniqueThread;
        const pid = ethreadObject.Cid.UniqueProcess;
        return `TID ${parseInt(tid.address)} PID ${parseInt(pid.address)}`;
    }
    else if(handle.Type.includes("File"))
    {
        const fileObject = handle.Object.UnderlyingObject;
        return `${fileObject.FileName}`;
    }
    else if(handle.Type.includes("ALPC Port"))
    {
        const objectHeader = handle.Object;
        return objectHeader.ObjectName ? `${objectHeader.ObjectName}` : "";
    }
    else
    {
        return "";
    }
}
function __getObjectNameFormat ( handle ) { if ( handle . Type == "Process" ) { const eprocessObject = handle . Object . UnderlyingObject ; const processImageFileNameAddress = eprocessObject . ImageFileName . targetLocation . address ; const processImageFileName = host . memory . readString ( eprocessObject . ImageFileName . targetLocation . address ) ; const processId = eprocessObject . UniqueProcessId . address ; return ` ${ processImageFileName . toString ( ) } ${ parseInt ( processId ) } ` ; } else if ( handle . Type . includes ( "Thread" ) ) { const ethreadObject = handle . Object . UnderlyingObject ; const tid = ethreadObject . Cid . UniqueThread ; const pid = ethreadObject . Cid . UniqueProcess ; return ` ${ parseInt ( tid . address ) } ${ parseInt ( pid . address ) } ` ; } else if ( handle . Type . includes ( "File" ) ) { const fileObject = handle . Object . UnderlyingObject ; return ` ${ fileObject . FileName } ` ; } else if ( handle . Type . includes ( "ALPC Port" ) ) { const objectHeader = handle . Object ; return objectHeader . ObjectName ? ` ${ objectHeader . ObjectName } ` : "" ; } else { return "" ; } }
Get handle and return string representation of it's object name.
Get handle and return string representation of it ' s object name .