Solved

int 21,3A

Posted on 1998-10-01
4
266 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

5 Ways to automate alert management in ConnectWise // The art of alerting is in automation. When humans are removed from the alerting process, errors are fewer and action is almost immediate. But how do you automate the alerting process and what …
Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 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