Solved

int 21,3A

Posted on 1998-10-01
4
247 Views
Last Modified: 2010-04-16
How can i substitute int 21,3A with my own int?
And how can i see what dir is beeng removed when the user uses int 21,3A (rmdir)?
0
Comment
Question by:zoranc
  • 2
4 Comments
 
LVL 2

Expert Comment

by:kellyjj
ID: 1215723
you can intercept the intr, and then process it with your own proc.  This very similar to what you would do with the tick timer.
0
 
LVL 3

Accepted Solution

by:
daitt earned 50 total points
ID: 1215724
INT 21h is an interrupt handled by DOS. 3Ah is the function number (specified by AH) within INT 21h. So you can replace INT 21h only (by GETINTVEC and SETINTVEC):

type myproc=procedure;
var oldint:pointer;
begin
   GetIntVec($21,oldint);
   SetIntVec($21,@myFunc);
{ do something }
   keep(0);
end.

then build a function to handle INT21, only process AH=3Ah function, every other AH will be pass to oldint(a pointer to old INT21h):
procedure myFunc(AH:byte);interrupt;
begin
   if AH=$3A then
      begin
   {do something}
      end
   else
       begin
         {Jump to oldint}
      end;
end.

About the way to get the name of the directory being removed, I'll answer later. Try the code above (maybe you will have to write some assembler codes)

0
 
LVL 3

Expert Comment

by:daitt
ID: 1215725
I'm sorry I'm so busy. Please give me your E-Mail address to finish my promise (about the way to get directory name).
Daitt@yahoo.com
0
 

Author Comment

by:zoranc
ID: 1215726
my e-mail address is  : nade@mol.com.mk
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now