Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

floppy lock

Posted on 2004-04-27
4
Medium Priority
?
241 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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 opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

721 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