![]() |
|
Модераторы: Daevaorn |
![]()
|
|
| _hunter |
|
|||
![]() Эксперт ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 8564 Регистрация: 24.6.2003 Где: Europe::Ukraine:: Kiev Репутация: 16 Всего: 98 |
как получить HANDLE к Thread' у?
вопрос возник потому что результат GetCurrentThread() решительно не устраивает GetThreadTimes() Заранее благодарю за ответ. -------------------- Tempora mutantur, et nos mutamur in illis... |
|||
|
||||
| Дрон |
|
|||
![]() Java-ненавистник :) ![]() ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 3179 Регистрация: 29.12.2002 Где: Санкт-Петербург Репутация: 10 Всего: 93 |
У меня GetThreadTimes() сработало -- в смысле того, что возвратило true.
А вообще CreateThread() возвращает handle созданного потока, какой тебе ещё нужен? -------------------- Да. Именно так. |
|||
|
||||
| Borisff2003 |
|
|||
![]() Бывалый ![]() Профиль Группа: Участник Сообщений: 198 Регистрация: 26.2.2004 Где: г. Уфа Репутация: 1 Всего: 1 |
Написано, что GetCurrentThread возвращает псевдоописатель, лдя применеия его в других потоках используй DuplicateHandle передав псевдоописатель как источник, так покрайне мере написано :-)
--------------------
Лень, двигатель прогресса |
|||
|
||||
| OlegsDP |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 37 Регистрация: 25.2.2004 Репутация: нет Всего: 1 |
The GetCurrentThread function returns a pseudohandle for the current thread.
HANDLE GetCurrentThread(VOID) Parameters This function has no parameters. 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. Pseudohandles are not inherited by child processes. This handle has the maximum possible access to the thread object. For systems that support security descriptors, this is the maximum access allowed by the security descriptor for the calling process. For systems that do not support security descriptors, this is THREAD_ALL_ACCESS. 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. A thread can create a "real" handle of itself that can be used by other threads, or inherited by other processes, by specifying the pseudohandle as the source handle in a call to the DuplicateHandle function. The pseudohandle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect. If the pseudohandle is duplicated by DuplicateHandle, the duplicate handle must be closed. |
|||
|
||||
![]()
|
| Правила форума "С++:Общие вопросы" | |
|
|
Добро пожаловать!
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Earnest Daevaorn |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | C/C++: Общие вопросы | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |