Discuss this help topic in CBFS Forum

OnGetVolumeLabel event/delegate/callback


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

CallbackFileSystem     See also    


The event is fired when the OS needs to get the volume label.


    property OnGetVolumeLabel : TCbFsGetVolumeLabelEvent;
    TCbFsGetVolumeLabelEvent = procedure( Sender : TObject; var VolumeLabel: TCBString ) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    void (__stdcall *CbFsGetVolumeLabelEvent)(void* Sender, LPTSTR VolumeLabel );

[C++ (VCL)]
    typedef void (__closure *TCbFsGetVolumeLabelEvent)( System::TObject* Sender, TCBString &VolumeLabel );

[C++ (.NET)]
    public __delegate void CbFsGetVolumeLabelEvent( CallbackFileSystem^ Sender, String^% VolumeLabel );

    public void CbFsGetVolumeLabelEvent( CallbackFileSystem Sender, ref String VolumeLabel );

    Sub CbFsGetVolumeLabelEvent( ByVal Sender As CallbackFileSystem, ByRef VolumeLabel As String )

    void ICbFsVolumeEvents.onGetVolumeLabel( CallbackFileSystem sender, stringRef volumeLabel );


  • Sender - reference to the class that called the delegate/event handler
  • VolumeLabel - the event handler must place the volume label to this parameter.
    [C++ (Lib)] The variable points to the buffer with max.length of 33 characters (up to 32 chars + trailing NULL), to which the event handler must copy the data.


This event is fired when the OS wants to obtain the volume label. Maximum length of the label supported by the OS is 32 characters.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to Callback File System. Throwing ECBFSError exception from this event handler will not cause the OS to abort the operation or display an error message to the user.

See also


Discuss this help topic in CBFS Forum