locking

I am using turboc 2.0 and I want to lock floppy drive.
mdamjadAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ankuratvbConnect With a Mentor Commented:
>Turbo C 2.0 still alive?? I was using the 3.0 a few hundred years ago :)
Yeah.Its available for free from the Borland Museum.

I still have the 3.0 version.It was a pretty good compiler.

mdamjad,
You say you need code without asm.
well,to do this sort of thing in dos,you will have to use dos interrupts(which is what the link i posted does).
Even if a compiler does(i dont think any compiler does) offer you a library function for this,it,too would probably be using dos interrupts.

0
 
anupvijayCommented:
I assume that your OS is DOS.
What does the LOCK command do on DOS ? Is that what you are looking for?

Cheers.
0
 
Avik DasguptaCommented:
I think u wan't to lock the device and not allow other processes to access it. But in that case u have to run the locking program as a background job. DOS is not multiprogrammable, in that case u need to go for TSR approach. It is impossible to give u the code but I recommend u to visit
http://amitmathur.8m.com/resources/article4.html

Do not misuse it :-)

Avik.
0
 
ankuratvbCommented:
This has what you require,enabling/disabling the floppy drive using Turboc code:
http://c.ittoolbox.com/code/d.asp?d=2042&a=s
0
 
MercantilumCommented:
Nice shot ankura,

Turbo C 2.0 still alive?? I was using the 3.0 a few hundred years ago :)
0
All Courses

From novice to tech pro — start learning today.