Home:ALL Converter>How to Block USB storage devices in MAC OS c/c++

How to Block USB storage devices in MAC OS c/c++

Ask Time:2020-02-12T15:02:05         Author:JAY prakash

Json Formatter

I want to restrict access to the USB storage devices. Either Just block or give read Only access to everyone.

Only calling process can access that devices No one else.

For Windows I have used CreateFile() and DeviceIoControl() to lock the Volume.

For Unix : To Make read only I can use diskUtil but I want it through program.

I don't want to use any registry kind of.

So any idea/solutions in c/c++?

platform : MAC OS.

Thanks.

Author:JAY prakash,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60182789/how-to-block-usb-storage-devices-in-mac-os-c-c
yy