Page 1 of 1
Lock hard disk
Posted: Tue Feb 04, 2003 12:00 am
by Nav
hai every body,
how can a hard disk or drive be write protected?
thanks
RE:Lock hard disk
Posted: Tue Feb 04, 2003 12:00 am
by Chase
It depends at what level of software you want to write protect the drive...
I've seen BIOSes with a drive write protect option but I think all that did was disable int0x13 write commands. *Some* scsi drives have a jumper to set write protection on but it's not standard. You're stuck at coding write protection into the OS layer and not allowing apps direct hardware access.
-Chase
RE:Lock hard disk
Posted: Thu Feb 06, 2003 12:00 am
by Nav
I need asm code or c++ source code to lock(write protection) and unlock(allowing writting) on the hard disk. if you know something please help me.
thanks
RE:Lock hard disk
Posted: Thu Feb 06, 2003 12:00 am
by carbonBased
I think you're making it too complicated, dude.
void writeBlock(char *data) {
if(hd->isWriteable()) writeData();
else error("HD is write protected");
return;
}
As far as I know, there is no standard way to write protect an HD in hardware... you'll have to make your own software substitude.
Jeff