Cambiato valore di default per attesa fine processo da 0x0000 a 0xFFFF

Ora e' possibile non trovare il task appena lanciato da WinExec e mettersi
in attesa del TASK generico 0 (per Foxpro)


git-svn-id: svn://10.65.10.50/trunk@1308 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-04-26 10:54:54 +00:00
parent c59efc82dd
commit dbe4179392
2 changed files with 10 additions and 5 deletions

View File

@ -94,7 +94,7 @@ public:
const char* get_firm_dir() const;
void wait_for(word taskid) { _waiting = taskid; }
void wake_up() { _waiting = 0; }
void wake_up() { _waiting = 0xFFFF; }
word waiting() const { return _waiting; }
void begin_wait() { set_cursor(TRUE); } // Set CURSOR_WAIT

View File

@ -66,13 +66,18 @@ int TExternal_app::run(bool async, bool utente)
HTASK child = NULL;
TASKENTRY te; te.dwSize = sizeof(TASKENTRY);
for (bool ok = TaskFirst(&te); ok; ok = TaskNext(&te))
if (te.hInst == (HINSTANCE)_exitcode) child = te.hTask;
CHECK(child, "Can't find child task");
if (te.hInst == (HINSTANCE)_exitcode)
{
child = te.hTask;
break;
}
// Warning! child could be NULL if you run that beast called Foxpro
main_app().wait_for((word)child);
for (byte i = 0; main_app().waiting(); i++)
for (byte i = 0; main_app().waiting() == (word)child; i++)
{
if (i == 0 && TaskFindHandle(&te, child) == FALSE)
if (i == 0 && ok && TaskFindHandle(&te, child) == FALSE)
break;
xvt_app_process_pending_events();
}