Get Process Id/ Thread ID In Visual Basic

Wednesday, May 14, 2008

How to get Process id and Thread id in Visual Basic?

Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long


Public Property Get ThreadID() As VariantThreadID = GetCurrentThreadIdEnd Property Public Property Get ProcessID() As Variant ProcessID = GetCurrentProcessId End Property

0 comments

Post a Comment