Create and manage virtual disk drives from your Windows applications

CBDisk.InstallIcon method


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CBDisk     See also    


Installs the ICO file for it's use as a custom icon for virtual disk


    class procedure InstallIcon( IconPath : TCBString; IconId : TCBString; var RebootNeeded : boolean );
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    static void InstallIcon( const wchar_t * IconPath, const wchar_t * IconId, bool * RebootNeeded );

[C++ (VCL)]
    static void __fastcall InstallIcon( TCBString IconPath, TCBString IconId, bool & RebootNeeded );

[C++ (.NET)]
    static void InstallIcon( String* IconPath, String* IconId, bool & RebootNeeded);

    static void InstallIcon( string IconPath, string IconId, ref bool RebootNeeded)

    Shared Sub InstallIcon( ByVal IconPath As String, ByVal IconId As String, ByRef RebootNeeded As Boolean)


  • IconPath - Path to .ico file, which will be used as an icon.
  • IconId - Icon identifier, used for various operations with this icon.
  • RebootNeeded - On return indicates if the system needs to be restarted before the icon can be used.


Use this function to install the icon (.ICO) file which will then be used in Explorer as a custom icon for the virtual disk. The icon is copied to the temporary file, which will be removed after deinstallation of the icon using UninstallIcon method.

Call from...

This method may be called only from outside of callback / event handlers.

See also

ResetIcon     SetIcon     UninstallIcon    

Back to top