PROCESS_INFORMATION说明,该如何处理

PROCESS_INFORMATION说明PrivateTypePROCESS_INFORMATIONhProcessAsLonghThreadAsLongdwProcessIDAsLongdw

PROCESS_INFORMATION说明
Private   Type   PROCESS_INFORMATION
        hProcess                 As   Long
        hThread                   As   Long
        dwProcessID           As   Long
        dwThreadID             As   Long
End   Type
有哪位大哥能帮忙解释一下此类型中各项的意思?
还有就是如何通过已知进程的PID求得相对就的PROCESS_INFORMATION?或是如何得到本进程的PROCESS_INFORMATION信息?



[解决办法]
Private Type PROCESS_INFORMATION
hProcess As Long ’指定要中断的一个进程的句柄
hThread As Long '线程句柄
dwProcessID As Long
dwThreadID As Long
End Type
[解决办法]
hProcess
Returns a handle to the newly created process. The handle is used to specify the process in all functions that perform operations on the process object.
hThread
Returns a handle to the primary thread of the newly created process. The handle is used to specify the thread in all functions that perform operations on the thread object.
dwProcessId
Returns a global process identifier that can be used to identify a process. The value is valid from the time the process is created until the time the process is terminated.
dwThreadId
Returns a global thread identifiers that can be used to identify a thread. The value is valid from the time the thread is created until the time the thread is terminated.
[解决办法]
GetCurrentProcess只返当前进程的伪句柄,如果你在你的进程中需要自己进程的句柄,就可以用GetCurrentProcess
[解决办法]
Public Type PROCESS_INFORMATION
hProcess As Long '进程句柄
hThread As Long '进程的主线程句柄
dwProcessId As Long '进程ID
dwThreadId As Long '进程的主线程ID
End Type