CallbackProcess

Control process start and stop operations in Windows and .NET applications

CallbackProcess.GetProcessName method

Filter:

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

CallbackProcess    

Overview

Returns process names for the given process ID.

Declaration

[Pascal]
    function GetProcessName(ProcessId : LongWord) : TCBString;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    void GetProcessName( DWORD ProcessId, PWSTR Buffer, DWORD BufferLength /* in characters */, PDWORD ResultLength /*in characters (null-terminating symbol is included)*/ );

[C++ (VCL)]
    TCBString __fastcall GetProcessName(unsigned long
ProcessId);

[C++ (.NET)]
    String GetProcessName(UInt32 ProcessId);

[C#]
    String GetProcessName(UInt32 ProcessId);

[VB.NET]
    Function GetProcessName(ByVal ProcessId As UInt32) As String

Parameters

  • ProcessID - timeout of the callback operations (in milliseconds) [C++ (Lib)]
  • Buffer - the buffer to store the process name
  • BufferLength - the size of the buffer referenced by Buffer parameter, expressed in characters
  • ResultLength - the size of the data placed into the buffer, expressed in characters including terminated NULL character

Return values

The name of the process that has the passed ID.

Description

Use this helper method to get the name of the process with the given ID. Note that the System process has no name.

Errors

In case of error ECBProcError exception is thrown.

Back to top