Removable Disk Lock?

Friends, How to lock / unlock (software) removable disk / drives in VB6? Do I need to know any specific win32 routines for this purpose?

0


a source to share


3 answers


Without using this, I would say that you want to look at the win32 IOCTL_STORAGE_MEDIA_REMOVAL Control Code parameter for DeviceIoControl (), which ".. Enables or disables the mechanism from which media is retrieved for those devices that have this locking capability ..."



+1


a source


Opening a file on a removable drive is the easiest way to lock the drive. This can be done with an internal Open

VB6 command, or by declaring an API OpenFile

and calling this.



I guess there are ways to lock the drive itself, but it's much easier to lock the file.

0


a source


It won't be useful to you, but simple proof, if it can be done there , from the linux kernel 2.6 documentation.

An alternative to the API, meanwhile, could be this , software that does just that, locks / unlocks CDs.

Greetings.

0


a source







All Articles