Hi All!
I need to call the DevHelp function RocBlock and ProcRun. How do I do this?
I write basedev 32 bit.
The parametr passed to the StrategyInit structure contains an address in an incomprehensible format (16:16?).
Attempts to convert it were unsuccessful. I receive a trap.
Please help me.
ULONG DevHlp;
ULONG ProcBlock(ULONG EventId,ULONG Timeout, USHORT Flags) {
if (!DevHlp) return 0xFFFFFFFF;
ULONG rc = 0;
_asm {
mov eax, DevHelp_ProcBlock_Code
mov edx, EventId
mov ecx, Timeout
mov bx, Flags
mov esi, dword ptr [DevHlp]
call esi
jc short_err
mov rc, 0
jmp done
short_err:
mov rc, eax
done:
}
return rc;
}
USHORT StrategyInit(REQPACKET *prp) {
DevHlp = (ULONG)Far16ToFlat(prp->init_in.ulDevHlp);
..............
}