Hallo,

some 16-bit program combo ( synario and friends from the coolrunner
CPLD Design Kit) loads up a long way but then seems to hang when
calling a helper program. The call to that helper program is displayed 
in some status line and the cursor displays the hour glass, without
any progress.

The helper program is called like:
Call KERNEL.166: WINEXEC(0x09071b4c "D:\\CAE\\SYNXPLA\\MAKEINI.EXE \
        D:\\CAE\\SYNXPLA\\CONFIG\\generic.ini -yield",0x0007) \
        ret=092f:06d4 ds=0937
...
trace:task:TASK_Create module='MAKEINI' cmdline=
        'D:\CAE\SYNXPLA\CONFIG\generic.ini -yield' task=0377
...
Ret  KERNEL.166: WINEXEC() retval=0x03d7 ret=092f:06d4 ds=0937

and then some toolhelp functions are called.

Winexec doesn't return in the first place pdb->task (0377) but
tdb->hInstance(03d7), as calculated in 
../loader/module.c:LoadModule

    hInstance = tdb && tdb->hInstance? tdb->hInstance : pdb? pdb->task : 0;

Changing this to 
    hInstance = pdb? pdb->task :(tdb && tdb->hInstance)?tdb->hInstance : 0;

so that there is a preference on returning the task value, makes the
program progress much further.

Does this change look right. Or should I look at something going wrong 
with the toolhelp functions?

Bye

Uwe Bonnes                [EMAIL PROTECTED]

Free Software: If you contribute nothing, expect nothing
--


Reply via email to