CallbackFilter

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

OnWriteFileN 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 needs to write the data from the open file or volume.

Declaration

[Pascal]
    property OnWriteFileN : TCbFltWriteFileEventN;
    TCbFltWriteFileEventN = procedure(Sender : TObject; FileName: TCBString; Position: Int64; BytesToWrite: LongWord; Status : DWORD) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CbFltWriteFileEventN)(CallbackFilter* Sender, LPWSTR FileName, __int64 Position, DWORD BytesToWrite, LONG Status);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbFltWriteFileEventN)(System::TObject* Sender, WideString FileName, __int64 Position, unsigned BytesToWrite, DWORD Status);

[C++ (.NET)]
    public delegate void CbFltWriteFileEventN(CallbackFilter^ Sender, String^ FileName, Int64 Position, Int32 BytesToWrite, Int32 Status);

[C#]
    delegate void CbFltWriteFileEventN(CallbackFilter^ Sender, string FileName, long Position, Int32 BytesToWrite, Int32 Status);

[VB.NET]
    Delegate Sub CbFltWriteFileEventN(ByVal Sender As CallbackFilter, ByVal FileName As String, ByVal Position As Long, ByVal BytesToWrite As Int32, ByVal Status As Int32, ByRref UserContext As IntPtr)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - contains the name of the file
  • Position - the starting position to write the file data to
  • BytesToWrite - the number of bytes to write from the file. The Buffer contains not more space, than this value.
  • Status - status code of the completed operation

Description

This notification callback is called when the OS needs to write the data to the open file or volume.

See also

OnWriteFileC    

Back to top