OnEnumerateHardLinks event/delegate/callback


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

CBFSConnect     See also    


The event is fired when the OS needs to create a hard link to an existing file.


    property OnCrerateHardLink : TCBCreateHardLinkEvent;
    TCBCreateHardLinkEvent = procedure( Sender : TObject; FileInfo: TCBFileInfo; HandleInfo: TCBHandleInfo; LinkName: TCBString ) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    void (__stdcall *CBCreateHardLinkEvent)(void* Sender, CBFileInfo* FileInfo, CBHandleInfo* HandleInfo, LPCWSTR LinkName );

[C++ (VCL)]
    typedef void (__closure *TCBCreateHardLinkEvent)( System::TObject* Sender, TCBFileInfo* FileInfo, TCBHandleInfo* HandleInfo, TCBString LinkName );

[C++ (.NET)]
    public __delegate void CBCreateHardLinkEvent( CBFSConnect^ Sender, CBFileInfo^ FileInfo, CBHandleInfo^ HandleInfo, String^ LinkName );

    public void CBCreateHardLinkEvent( CBFSConnect Sender, CBFileInfo FileInfo, CBHandleInfo HandleInfo, String LinkName );

    Sub CBCreateHardLinkEvent( ByVal Sender As CBFSConnect, ByVal FileInfo As TCBFileInfo, ByVal HandleInfo As CBHandleInfo, ByVal LinkName As String )

    void ICbFsEnumerateEvents.onEnumerateHardLinks( String fileName, CBFileInfo fileInfo, CBHandleInfo handleInfo, string LinkName );


  • Sender - reference to the class that called the delegate/event handler.
  • FileInfo - information about the file to which the link points.
  • HandleInfo - information about particular directory handle which was opened for the purpose of directory enumeration
  • LinkName - The filename (with complete path) of the link to be created.


This event is fired when the OS wants to create a hard link to a file. Read more about hard links.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to CBFS Connect.

See also

OnCloseHardLinksEnumeration     OnEnumerateHardLinks