Discuss this help topic in CBFS Forum

OnGetVolumeLabel event/delegate/callback

Filter:

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

CallbackFileSystem     See also    

Overview

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

Declaration

[Pascal]
    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 );

[C#]
    public void CbFsGetVolumeLabelEvent( CallbackFileSystem Sender, ref String VolumeLabel );

[VB.NET]
    Sub CbFsGetVolumeLabelEvent( ByVal Sender As CallbackFileSystem, ByRef VolumeLabel As String )

[Java]
    void ICbFsVolumeEvents.onGetVolumeLabel( CallbackFileSystem 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 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

OnSetVolumeLabel    

Discuss this help topic in CBFS Forum