CallbackFilter

Instant control over file and folder operations in Windows and .NET applications

OnUserFsRequestN event/delegate/notification

Filter:

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

CallbackFilter     See also    

Overview

This notification callback is called when the OS sends one of the supplementary IRPs to the filesystem.

Declaration

[Pascal]
    property OnUserFsRequestN : TCbFltUserFsRequestEventN;
    TCbFltUserFsRequestEventN = procedure(Sender : TObject; FileName: TCBString; UserFsControlCode: LongWord; Buffer : Pointer; BufferLength: LongWord) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CbFltUserFsRequestEventN)(CallbackFilter* Sender, LPWSTR FileName, unsigned long UserFsControlCode, void * Buffer, unsigned long BufferLength );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbFltUserFsRequestEventN)(System::TObject* Sender, WideString FileName, unsigned long UserFsControlCode, void * Buffer, unsigned long BufferLength);

[C++ (.NET)]
    public delegate void CbFltUserFsRequestEventN(CallbackFilter^ Sender, String^ FileName, UInt32 UserFsControlCode, IntPtr Buffer, UInt32 BufferLength);

[C#]
    delegate void CbFltUserFsRequestEventN(CallbackFilter^ Sender, string FileName, UInt32 UserFsControlCode, IntPtr Buffer, UInt32 BufferLength);

[VB.NET]
    Delegate Sub CbFltUserFsRequestEventN(ByVal Sender As CallbackFilter, ByVal FileName As String, ByVal UserFsControlCode As UInt32, ByVal Buffer As IntPtr, ByVal BufferLength As UInt32)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - contains the name of the file
  • UserFsControlCode - the IRP code that was reported (see description for details)
  • Buffer - the data passed with the IRP
  • BufferLength - the length of the data contained in Bufer

Description

This notification callback is called when the OS sends one of the following IRPs to the filesystem: FSCTL_FILE_LEVEL_TRIM, FSCTL_OFFLOAD_WRITE, FSCTL_SET_ZERO_DATA. The operation is identified in UserFsControlCode parameter. The Buffer can be typecast to the request-specific data structure for use.

See also

OnPostUserFsRequestC     OnUserFsRequestC    

Back to top