A simple media-locking program for Win95

This program is a sample on how to lock removable media, preventing its removal, by using MS-DOS in21h calls under Win95. Some caveats, however: It will NOT work on NT, and it won’t work on all drives, even if the program says it succeeded in locking. For example, my own CD-ROM drive, doesn’t support locking, so the program will not work with it. Floppy drives usually don’t support locking either.

The program can be called : lock <drive letter> [-l | -u | -s]. -l will lock the drive. -u will unlock it and -s will dislay the lock count for the drive. The code has complete explanations on the functions, so here it is: lock.c

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>