首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

请教在WINCE中如何获得当前线程ID呢?有些难度的有关问题呀!

2012-01-06 
请问在WINCE中怎么获得当前线程ID呢?有些难度的问题呀!!!!!!请问在WINCE中怎么获得当前线程ID呢?在WINDOWS

请问在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的帮助文档。
[解决办法]
给你个参考网站:

http://www.pinvoke.net/default.aspx/coredll.CreateProcess

左侧coredll.dll的api列表里面确实没有GetCurrentThreadId

只能帮你这些了,没开发过wince程序

热点排行