Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
'---------------------------------------------------------------------------------------
' Procedure : GetWindowParentProcess
' DateTime : 01/03/2007 18:48
' Author : Vb System Library
' Purpose : Permet de récupérer l'ID du processus d'une fenêtre
' Params : hWnd : Handle de la fenetre
'---------------------------------------------------------------------------------------
Public Function GetWindowParentProcess(ByVal hWnd As Long) As Long
GetWindowThreadProcessId hWnd, GetWindowParentProcess
End Function
'---------------------------------------------------------------------------------------
' Procedure : GetWindowParentThreadID
' DateTime : 01/03/2007 18:48
' Author : Vb System Library
' Purpose : Permet de récupérer l'ID du thread qui a créé une fenetre
' Params : hWnd : Handle de la fenetre
'---------------------------------------------------------------------------------------
Public Function GetWindowParentThreadID(ByVal hWnd As Long) As Long
GetWindowParentThreadID = GetWindowThreadProcessId(hWnd, ByVal 0)
End Function
Le 01/03/2007 par MadMatt : Javais oublié un argument pour lAPI
Seul les admins et l'auteur du code lui même peuvent modifier ce code.