|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
24.11.2007, 17:14 | #1 |
Участник клуба
Регистрация: 30.04.2007
Сообщений: 1,307
|
Как программно определить зависшее приложение?
Требуется код, который определял бы состояние другого приложения, т.е. завило приложение или нет.
Заранее благодарю.
Всё гениальное - просто!
|
24.11.2007, 20:49 | #2 |
Старожил
Регистрация: 13.12.2006
Сообщений: 3,859
|
хм.. не знал что у процесса есть параметр определяющих зависание, это скорее субъективный вывод
ICQ не для вопросов, а для предложений. Для вопросов используйте форум
IRC канал клуба программистов|Мои статьи |
25.11.2007, 14:19 | #3 |
Участник клуба
Регистрация: 30.04.2007
Сообщений: 1,307
|
Не знаю точно, но должно быть какое-то сообщение в системе отнасительно процесса.
Может нужно послать какое-то сообщение процессу, что б узнать его состояние. У меня проблема с "Empire Earth - Art Of Conquest", когда я создаю не коректный скрипт, игра конкретно зависает (не сворачивается), мне нужно как-то это определить программно.
Всё гениальное - просто!
|
25.11.2007, 14:43 | #4 |
JAVA BEAN
Участник клуба
Регистрация: 22.04.2007
Сообщений: 1,329
|
Не определить. Программа может казаться подвисшей, а на самом деле просто долго считать.
|
25.11.2007, 15:10 | #5 |
Старожил
Регистрация: 13.12.2006
Сообщений: 3,859
|
Вобщем алгоритм только твой и как я написал вывод только субъективный, вот что может тебе помочь:
GetProcessTimes Retrieves timing information for the specified process. BOOL WINAPI GetProcessTimes( HANDLE hProcess, LPFILETIME lpCreationTime, LPFILETIME lpExitTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime ); Parameters hProcess [in] A handle to the process whose timing information is sought. This handle must be created with the PROCESS_QUERY_INFORMATION access right. For more information, see Process Security and Access Rights. lpCreationTime [out] A pointer to a FILETIME structure that receives the creation time of the process. lpExitTime [out] A pointer to a FILETIME structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined. lpKernelTime [out] A pointer to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value. lpUserTime [out] A pointer to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value. GetProcessMemoryInfo Retrieves information about the memory usage of the specified process. BOOL WINAPI GetProcessMemoryInfo( HANDLE Process, PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb ); Parameters Process [in] Handle to the process. The handle must have the PROCESS_QUERY_INFORMATION and PROCESS_VM_READ access rights. For more information, see Process Security and Access Rights. ppsmemCounters [out] Pointer to the PROCESS_MEMORY_COUNTERS or PROCESS_MEMORY_COUNTERS_EX structure that receives information about the memory usage of the process. cb [in] Size of the ppsmemCounters structure, in bytes.
ICQ не для вопросов, а для предложений. Для вопросов используйте форум
IRC канал клуба программистов|Мои статьи |
26.11.2007, 00:30 | #6 |
Участник клуба
Регистрация: 30.04.2007
Сообщений: 1,307
|
OK, проверю, благодарю.
Всё гениальное - просто!
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Среди 20 введёных чисел определить чётные, распечатать их, определить min | Spade | Помощь студентам | 4 | 15.06.2008 18:39 |
Программно нажать кнопку | DeDoK | Общие вопросы Delphi | 2 | 04.05.2008 21:46 |
программно из *.tif to *.jpg | Abbatik | Помощь студентам | 1 | 20.02.2008 23:55 |
jpg в image1 программно | Лёка | Мультимедиа в Delphi | 3 | 12.01.2008 00:16 |
Программно связать таблицы | Таня84 | БД в Delphi | 0 | 20.03.2007 18:43 |