Discuss this help topic in CBFS Forum

OnEnumerateHardLinks 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 create a hard link to an existing file.


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

[C++ (Lib)]
    void (__stdcall *CbFsCreateHardLinkEvent)(void* Sender, CbFsFileInfo* FileInfo, CbFsHandleInfo* HandleInfo, LPCWSTR LinkName );

[C++ (VCL)]
    typedef void (__closure *TCbFsCreateHardLinkEvent)( System::TObject* Sender, TCbFsFileInfo* FileInfo, TCbFsHandleInfo* HandleInfo, TCBString LinkName );

[C++ (.NET)]
    public __delegate void CbFsCreateHardLinkEvent( CallbackFileSystem^ Sender, CbFsFileInfo^ FileInfo, CbFsHandleInfo^ HandleInfo, String^ LinkName );

    public void CbFsCreateHardLinkEvent( CallbackFileSystem Sender, CbFsFileInfo FileInfo, CbFsHandleInfo HandleInfo, String LinkName );

    Sub CbFsCreateHardLinkEvent( ByVal Sender As CallbackFileSystem, ByVal FileInfo As TCbFsFileInfo, ByVal HandleInfo As CbFsHandleInfo, ByVal LinkName As String )

    void ICbFsEnumerateEvents.onEnumerateHardLinks( String fileName, CbFsFileInfo fileInfo, CbFsHandleInfo 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 Callback File System.

See also

OnCloseHardLinksEnumeration     OnEnumerateHardLinks    

Discuss this help topic in CBFS Forum