请问在WINCE中怎么获得当前线程ID呢?有些难度的问题呀!!!!!!
请问在WINCE中怎么获得当前线程ID呢?
在WINDOWS XP中的kernel32.dll有GetCurrentThreadId方法获得当前线程ID,不知道在WINOWS CE中是用什么函数获得线程ID呢?
好象在WINDOWS CE中对应kernel32.dll的是coredll.dll,只是不知道在这个DLL中是否有获得当前线程ID的方法呢?
__________________________________________________________________________
GetCurrentThread
Requirements
OS Versions: Windows CE 1.0 and later.
Header: Kfuncs.h.
Link Library: Coredll.lib.
This function returns a pseudohandle for the current thread.
HANDLE GetCurrentThread(void);
Parameters
None.
Return Values
The return value is a pseudohandle for the current thread.
Remarks
A pseudohandle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself whenever a thread handle is required.
This handle has the maximum possible access to the thread object.
The function cannot be used by one thread to create a handle that can be used by other threads to refer to the first thread. The handle is always interpreted as referring to the thread that is using it.
The pseudohandle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect.
Requirements
OS Versions: Windows CE 1.0 and later.
Header: Kfuncs.h.
Link Library: Coredll.lib.
GetCurrentThreadId
Requirements
OS Versions: Windows CE 1.0 and later.
Header: Kfuncs.h.
Link Library: Coredll.lib.
This function returns the thread identifier,which is used as a handle of the calling thread.
DWORD GetCurrentThreadId(void);
Parameters
None.
Return Values
The thread identifier of the calling thread indicates success.
Remarks
Until the thread terminates,the thread identifier uniquely identifies the thread throughout the system. This identifier is also the handle of the thread.
Requirements
OS Versions: Windows CE 1.0 and later.
Header: Kfuncs.h.
Link Library: Coredll.lib.
See Also
GetCurrentThread
__________________________________________________________________________
可以下载个evc的帮助文档。
__________________________________________________________________________
不行,报错说在coredll.dll中没有找到GetCurrentThreadId.
我的实现代码如下:
Private Const WH_MOUSE As Integer = 20
Private hHook As Integer = 0
Private HookProc As CallBack
Public Overloads Shared Function GetCurrentThreadId() As Integer
End Function