CBHandleInfo.GetCreatorProcessId method


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

CBHandleInfo     See also    


Returns the PID (process ID) of the process, that opened the file handle


    function GetCreatorProcessId() : LongWord;

[C++ (Lib)]
    unsigned long GetCreatorProcessId();

[C++ (VCL)]
    unsigned long __fastcall GetCreatorProcessId();

[C++ (.NET)]
    UInt32 GetCreatorProcessId();

    UInt32 GetCreatorProcessId();

    Function GetCreatorProcessId() As UInt32

    long getCreatorProcessId();

Return values

The ID of the process.


Use GetCreatorProcessId to get the process ID (PID) of the process that opened the file handle.

Note that the PID is guaranteed to be unique only during lifetime of the process. When the process is terminated, its PID can (in theory) be used by other process. In fact this never happens, but such possibility is documented by Microsoft.

Call from...

This method may be called only from callback / event handlers.

See also

GetCreatorProcessName method     GetCreatorThreadId method     GetOriginatorProcessId method