Solved

floppy lock

Posted on 2004-04-27
4
232 Views
Last Modified: 2010-04-15
please give me a windows based floppy drive and cd drive authentiction using 'c' but without using assembler
0
Comment
Question by:mdamjad
  • 2
4 Comments
 
LVL 12

Expert Comment

by:stefan73
ID: 10936764
Hi mdamjad,
Be more specific. What do you want to achieve?

Cheers,
Stefan
0
 
LVL 9

Expert Comment

by:ankuratvb
ID: 10937698
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
 
LVL 8

Accepted Solution

by:
manish_regmi earned 125 total points
ID: 11013745
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
 
LVL 8

Expert Comment

by:manish_regmi
ID: 11013839
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Statment to match two tables in c# 6 74
Convert image to byte array 8 173
UPD maximums on Red Hat 6 102
Grammars for C C++ and java 1 108
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

708 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

13 Experts available now in Live!

Get 1:1 Help Now