I using a VBS-Script, that creates a Excel-sheet with all Informations.
Would that work for You ?. You can start it from inside Your Application if needed.
It is tested with XP and Vista
API-Function for FWH :
DLL32 FUNCTION GetCurProI( );
AS LONG PASCAL;
FROM "GetCurrentProcessId" LIB "KERNEL32"The Info :
...
...
ACTION ( MsgAlert( GetCurProI(), "Process-ID" ) )
Maybe You still need a list of Service-processes ??? :
Using the Service Process IdentifierTo launch the Service Process Identifier, just double-click the ServiceProcessID.vbs file.
While the script is running, you’ll see a series of popup dialog boxes that will keep
you informed of the program’s progress.
When the script finishes compiling its list of services, it will launch Excel and display
the worksheet, which consists of two columns—one for the Process ID (PID) and the other
for the Services. The PIDs will be listed in ascending order and appear in red.
The Services will be listed by their full name and appear in blue.
Right below the full name, you’ll find the command line, which will appear in black,
used to launch the service.
When the spreadsheet appears, press [Ctrl][Shift][Esc] to access Task Manager.
With Task Manager up and running, select the Processes tab. If you don’t see a column titled PID,
pull down the View menu, choose the Select Columns command,
select the PID (Process Identifier) check box, and then click OK. Now, click
the PID column header to sort the list of processes by the PID number in ascending order.
If you wish, you and click and drag the PID column to reposition it on the left-hand side
of the Processes display.
At this point, you can scroll through the Processes display, locate the process you’re
interested in and match its PID to the one in the Service Process Identifier worksheet.
Saving the spreadsheet
While this spreadsheet is only meant for temporary use during a troubleshooting operation,
you may want to save it for future reference. However, keep in mind that the original
format of the data is a simple Comma Separated Value (CSV) file, so Excel will prompt you
to make a decision as to formatting before it will allow you to save the file.
In order to preserve the formatting and save the file in Excel format, follow the
instructions displayed in the dialog box.