System.MainThreadID
Delphi
MainThreadID: TThreadID; { ThreadID of thread that module was initialized in }
C++
extern DELPHI_PACKAGE TThreadID MainThreadID;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
variable | public | System.pas System.hpp |
System | System |
Description
Indique le handle d'instance du thread d'exécution principal du module en cours.
Utilisez MainThreadID pour obtenir l'ID du thread d'exécution principal (le thread en cours lorsque le module a été initialisé).
Pendant le débogage, cet ID apparaît dans la boîte d'état du thread pour le thread principal.
Remarque : Sous Windows, la valeur de MainThreadID est compatible avec l'identifiant de thread requis par certains appels de l'API Win32.