DiskArbitration callback issue

I’m currently coding an utility that need the DiskArbitration framework. I use this framework to be notified each time a disk image (.dmg) is mounted on the filesystem by registering to DADiskMountApprovalCallback with the DARegisterDiskMountApprovalCallback() function. If you are interested in how these functions work you can read one of my previous post in which I talk about this.
Continue reading

Prevent a disk from mounting on the filesystem

Today I will show you how to prevent a disk (physical or virtual) to mount on the filesystem.
In order to do that, we will use the DiskArbitration framework. There is very few documentation for this framework, the best is to read the header files, which are very well commented.
Continue reading