OnGetVolumeLabel event/delegate/callback

Filter:

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

CBFSConnect     See also    

Overview

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

Declaration

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

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

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

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

[C#]
    public void CBGetVolumeLabelEvent( CBFSConnect Sender, ref String VolumeLabel );

[VB.NET]
    Sub CBGetVolumeLabelEvent( ByVal Sender As CBFSConnect, ByRef VolumeLabel As String )

[Java]
    void ICbFsVolumeEvents.onGetVolumeLabel( CBFSConnect sender, stringRef volumeLabel );

Parameters

  • 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.

Description

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 CBFS Connect. Throwing ECBFSConnectError exception from this event handler will not cause the OS to abort the operation or display an error message to the user.

See also

OnSetVolumeLabel