• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

floppy lock

please give me a windows based floppy drive and cd drive authentiction using 'c' but without using assembler
0
mdamjad
Asked:
mdamjad
  • 2
1 Solution
 
stefan73Commented:
Hi mdamjad,
Be more specific. What do you want to achieve?

Cheers,
Stefan
0
 
ankuratvbCommented:
Hi mdamjad,

You already have an open thread on the same question.
http://oldlook.experts-exchange.com:8080/Programming/Programming_Languages/C/Q_20969167.html

You shouldve specified this clarification in that thread itself.

0
 
manish_regmiCommented:
hi,
 You need to hook int 13 dl=0.
It can be done using turbo c 2.0 without assembly language but not withhout  the concept of assembly or pc architecture.

#include <dos.h>
#include <stdio.h>

void interrupt (*int13)();

void interrupt hooked()
{
   if(_DL == 0)
   {
   /* You are accessing floppy */
    printf("Floppy is locked by mdamjad\n");
   }
   /* if harddisk is accessed. let him go. */
    else
      int13();
}
void main()
{
       int13 = getvect(0x13);
       setvect(0x13, &hooked);
 }

Use for educational purpose only.

regards manish
0
 
manish_regmiCommented:
oh,
 I forgot to tell. It will only work on DOS. Maybe on win95 and win98.
It will NOT work on Windows nt/2000/xp.

happy hacking.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now