Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2002.11.11;
Скачать: [xml.tar.bz2];

Вниз

Не закрывается окно Дос приложения   Найти похожие ветки 

 
VepAlex   (2002-10-02 06:21) [0]

Здравствуйте. У меня такая проблема:
Я запуская Дос программу CreateProcess(...)
а потом жду ее завершения WaitForSingleObject(...)
Все работает нормально, за исключением одного:
Возможен случай, когда процесс завершается, а окно не закрывается
(сообщение в заголовке - сеанс завершен - finished)
В этом случае моя программа виснет на WaitForSingleObject
Можно конечно выждать какое-то время, а потом самому закрывать процесс вручную или создать конфигурацию (pif файл) чтобы окно закрывалось, но хотелось бы знать как решается такая проблема функциями Windows API чтобы написать универсальный вариант.
Заранее благодарю.


 
Song   (2002-10-02 08:47) [1]

Это беда Win16 или Dos приложений.
Я исправлял ситуацию поиском окна с таким названием.


 
proton_   (2002-10-02 18:44) [2]

вот структура пиф файла, используй если хош
PIF Format
Intel byte order

Information from File Format List 2.0 by Max Maischein.

--------!-CONTACT_INFO----------------------
If you notice any mistakes or omissions, please let me know! It is only
with YOUR help that the list can continue to grow. Please send
all changes to me rather than distributing a modified version of the list.

This file has been authored in the style of the INTERxxy.* file list
by Ralf Brown, and uses almost the same format.

Please read the file FILEFMTS.1ST before asking me any questions. You may find
that they have already been addressed.

Max Maischein

Max Maischein, 2:244/1106.17
Max_Maischein@spam.fido.de
corion@informatik.uni-frankfurt.de
Corion on #coders@IRC
--------!-DISCLAIMER------------------------
DISCLAIMER: THIS MATERIAL IS PROVIDED "AS IS". I verify the information
contained in this list to the best of my ability, but I cannot be held
responsible for any problems caused by use or misuse of the information,
especially for those file formats foreign to the PC, like AMIGA or SUN file
formats. If an information it is marked "guesswork" or undocumented, you
should check it carefully to make sure your program will not break with
an unexpected value (and please let me know whether or not it works
the same way).

Information marked with "???" is known to be incomplete or guesswork.

Some file formats were not released by their creators, others are regarded
as proprietary, which means that if your programs deal with them, you might
be looking for trouble. I don"t care about this.
--------------------------------------------

The Program Information Files have stayed a long time with the PC. They origi-
nated from IBMs Topview, were carried on by DoubleView and DesqView, and today
they are used by Windows and Windows NT. The PIF files store additional
information about executables that are foreign to the running multitasking
system such as ressource usage, keyboard and mouse virtualization and hotkeys.
The original (Topview) PIF had a size of 171h bytes, after that, there come the
various extensions for the different operating environments. The different
extensions are discussed in their own sections.

OFFSET Count TYPE Description
0000h 1 byte reserved
0001h 1 byte Checksum
0002h 30 char Title for the window
0020h 1 word Maximum memory reserved for program
0022h 1 word Minimum memory reserved for program
0024h 63 char Path and filename of the program
0063h 1 byte 0 - Do not close window on exit
other - Close window on exit
0064h 1 byte Default drive (0=A: ??)
0065h 64 char Default startup directory
00A5h 64 char Parameters for program
00E5h 1 byte Initial screen mode, 0 equals mode 3 ?
00E6h 1 byte Text pages to reserve for program
00E7h 1 byte First interrupt used by program
00E8h 1 byte Last interrupt used by program
00E9h 1 byte Rows on screen
00EAh 1 byte Columns on screen
00EBh 1 byte X position of window
00ECh 1 byte Y position of window
00EDh 1 word System memory ?? whatever
00EFh 64 char ?? Shared program path
012Fh 64 char ?? Shared program data file
016Fh 1 word Program flags

EXTENSION:PIF,DVP
OCCURENCES:PC
PROGRAMS:Topview, DesqView, Windows
REFERENCE:see DDJ #202, July 1993, QuarterDeck SDK
SEE ALSO:Windows PIF, Windows NT PIF
VALIDATION:



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2002.11.11;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.46 MB
Время: 0.007 c
1-33934
KDCF
2002-10-31 22:41
2002.11.11
Народ помогите!!!


14-34219
Дремучий
2002-10-17 16:22
2002.11.11
О форуме...


14-34227
Vlad2
2002-10-23 07:04
2002.11.11
ищу двоичный редактор


1-34065
Anakin
2002-10-31 00:46
2002.11.11
Поиск по шаблону


3-33918
Andriano
2002-10-23 12:19
2002.11.11
Подскажите БД-новичку





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский