CallbackFilter.SetEndOfFile method


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

CallbackFilter     See also    


Sets file size bypassing filters.


    function SetEndOfFile(FileHandle: THandle; EndOfFile : Int64) : boolean;

[C++ (Lib)]
    bool SetEndOfFile(HANDLE FileHandle, __int64 EndOfFile);

[C++ (VCL)]
    bool __fastcall SetEndOfFile(SafeFileHandle FileHandle, __int64 EndOfFile);

[C++ (.NET)]
    bool SetEndOfFile(SafeFileHandle^ FileHandle, Int64 EndOfFile);

    bool SetEndOfFile(SafeFileHandle FileHandle, Int64 EndOfFile);

    Function SetEndOfFile(ByVal FileHandle As SafeFileHandle, ByVal EndOfFile As Int64)


  • FileHandle - handle of the file previously opened using CreateFile(), OpenFile() or CreateNonCbFile() method
  • EndOfFile - New end of file (size of the file)

Return values

TRUE / true if the function succeeded or FALSE / false if the function failed.


Use this method in your callback handler to change the size of the file without triggering further callbacks and avoiding the endless recursion.

See also

CreateFile     OpenFile