Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process Handle - > ProcessID
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00797981
Message ID:
00798037
Vues:
30
The GetProcessId function retrieves the process identifier of the specified process.
void GetProcessId(
  HANDLE Process
);
If the function succeeds, the return value is the process identifier of the specified process. If the function fails, the return value is zero.

FoxPro declaration:
DECLARE INTEGER GetProcessId IN kernel32 INTEGER hProcess
Looks like this function is available starting from Windows XP, not in earlier versions.

* * *
Another option is process enumeration. Having all running processes enumerated with all their Process Id and Process Handles available, you just search a handle in the list.

On my site I have two examples in member area:

Enumerating Processes -- WinNT
http://www.news2news.com/vfp/?example=162

Enumerating Processes -- Win9*
http://www.news2news.com/vfp/?example=164

There should be something in UT archives on process enumeration too. Recently I saw a thread on this subject.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform