Discuss this help topic in CBFS Forum

Custom icons for virtual disks in Explorer

Callback File System lets you create custom icon for your virtual disk. This icon is shown by Windows Explorer.

Via an additional file

If you can present an additional file on the virtual disk, then the method described in MSDN can work for you.

Via shell extension

Custom icons are implemented using icon overlay mechanism and are restricted to 25% of original icon size (except 16x16 icons). This method is better than using additional files, because you might not want to have those additional files visible to the user. Also it's possible to install multiple icons for different disk states (or different disks) and change icons by calling SetIcon/ResetIcon methods.

Overlay icons map as follows:

Icon files must have the following color levels:

Before the icon can be used (set) it needs to be installed using InstallIcon method. This method should be executed by the process running under Administrator account or with elevated rights.

During installation the icon is copied to the temporary file, which will be removed after deinstallation of the icon using UninstallIcon method. Then you can set the icon using SetIcon method.

For custom icons to work you need to include CBFSMntNtf*.dll to the list of modules installed using Install method.

Discuss this help topic in CBFS Forum