Solved

int 21,3A

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WSAAdressToString example Delphi code needed 3 1,760
Embarcadero Interbase 9 747
Can you change icon dynamically in Delphi? 3 631
Convert Jpg /PNG To GIF 5 118
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Scenario: Your operations manager has discovered an anomaly in your security system. The business will start to suffer within 15 minutes if it is a major IT incident. What should she do? We have 6 recommendations for managing major incidents (https:…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A short film showing how OnPage and Connectwise integration works.

914 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

20 Experts available now in Live!

Get 1:1 Help Now