Board index » delphi » *HELP!* Can somebody please answer this question?

*HELP!* Can somebody please answer this question?

Does anybody know how to write INT 21h extenders in Turbo Pascal?
I want to call BooleanFunction and send back "File not found" code if
BooleanFunction returns false, or call the old 21h handler and continue
as if nothing happened if BooleanFunction returns true,
before each DOS open or delete service.
I do know that Pascal stores the Int 21 in SaveInt21, and I have been able
to install correctly, but it still freezes up upon termination. (I think
after first int 21h call)
Can anybody help??
Thanks in advance  :)
---------------------------
Maarten Patterson
E-Mail:  maart...@together.net

p.s.  Could you let me know if you can't answer this?  Because I wouldn't
know whether you you just didn't read this!

 

Re:*HELP!* Can somebody please answer this question?


Quote
Maarten Patterson <maart...@together.net> wrote:

>Does anybody know how to write INT 21h extenders in Turbo Pascal?
>I want to call BooleanFunction and send back "File not found" code if
>BooleanFunction returns false, or call the old 21h handler and continue
>as if nothing happened if BooleanFunction returns true,
>before each DOS open or delete service.

I posted a solution with the thread to your previous post
on Writing ISR's.  

I'm still curious as to the usefulness of what you propose
to do. DOS uses the carry flag to report the success or
failure of a function.  When carry is TRUE, the AX register
contains an error code describing the failure. If your TSR
doesn't follow the rules, then programs are going to fail
and have unpredictable results whenever your TSR is
resident.

But the real question comes back to the fact that if a
program is not listening to or properly responding to the
DOS error codes, how do you expect it to be any different
with your TSR?

Failures for Function 3Dh, Open file with handle:
02h: File Not Found
03h: Path not found
04h: Too many open files
05h: Access denied
0Ch: Invalid access code

Failures for Function 41h, Delete file:
02h: File Not Found
03h: Path not found
05h: Access denied

Quote
>p.s.  Could you let me know if you can't answer this?  Because I wouldn't
>know whether you you just didn't read this!

I smile when I see something like this and shudder whenever
someone says "send all the <blank> your have".  I often
wonder how many people respond.  Talk about spam!  No doubt
about it.  You could really kill a mail box this way. :->

    ...red

--
Support the anti-Spam amendment
  Join at http://www.cauce.org/

Other Threads