Solved

floppy lock

Posted on 2004-04-27
4
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

752 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