术语 | thread32first |
释义 | Thread32First 语法: C++ BOOL WINAPI Thread32First( __in HANDLE hSnapshot, __inout LPTHREADENTRY32 lpte ); Thread32First功能 检索有关的任何过程,遇到的第一个线程的系统快照。 参数 hSnapshot [in] 一个句柄,从先前调用CreateToolhelp32Snapshot函数返回的快照。 lpte [ in , out ] 一个 THREADENTRY32结构的指针。 返回值 返回true如果在主题列表第一项已被复制到缓冲区或否则返回FALSE。 The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no threads exist or the snapshot does not contain thread information. 备注 调用应用程序必须设置THREADENTRY32 dwSize成员的大小,以字节为单位的结构。 Thread32First变化dwSize,以书面向结构的字节数。这将永远不会大于dwSize初始值,但它可能会更小。如果该值较小,不依赖于任何成员的偏移量大于此值的值。 检索有关在同一快照记录的其他线程的信息,请使用Thread32Next功能。 实例 有关示例,请参见遍历线程列表。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderTlhelp32.h LibraryKernel32.lib DLLKernel32.dll 参见 CreateToolhelp32Snapshot 螺纹散步 Thread32Next THREADENTRY32 工具帮助函数 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==Thread32First Function Retrieves information about the first thread of any process encountered in a system snapshot. Syntax C++ BOOL WINAPI Thread32First( __in HANDLE hSnapshot, __inout LPTHREADENTRY32 lpte ); Parameters hSnapshot [in] A handle to the snapshot returned from a previous call to the CreateToolhelp32Snapshot function. lpte [in, out] A pointer to a THREADENTRY32 structure. Return Value Returns TRUE if the first entry of the thread list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no threads exist or the snapshot does not contain thread information. Remarks The calling application must set the dwSize member of THREADENTRY32 to the size, in bytes, of the structure. Thread32First changes dwSize to the number of bytes written to the structure. This will never be greater than the initial value of dwSize, but it may be smaller. If the value is smaller, do not rely on the values of any members whose offsets are greater than this value. To retrieve information about other threads recorded in the same snapshot, use the Thread32Next function. Examples For an example, see Traversing the Thread List . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderTlhelp32.h LibraryKernel32.lib DLLKernel32.dll See Also CreateToolhelp32Snapshot Thread Walking Thread32Next THREADENTRY32 Tool Help Functions Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686728(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。