Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.FileSize Property

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< Previous Top Next >
Declaration
Getting property value:
Automation:
ulong  value = obj.FileSize;
Native (C++):
HRESULT  get_ FileSize ( [out, retval]   unsigned __int64 *  pFileSize) ;
Setting property value:
Automation:
obj.FileSize = Value;
Native (C++):
HRESULT  put_ FileSize ( [in]   unsigned __int64  FileSize) ;
Parameters
pFileSize Pointer to a variable that receives a property value. FileSize New file's size.
Return Value
Automation:Current file's size.Native: S_OK or standard OLE error code. Native: S_OK or standard OLE error code.
Remarks
Retrieve or change the current file's size. When used to change the file's size, new operation is created in document's operation history. Complexity: constant-time.
Examples

Setting file's size

JavaScript Copy Code
var fdoc = new ActiveXObject("FileDocument.FileDocument");
fdoc.New();  // initialize a new, empty document
fdoc.FileSize = 1024*1024; // set the size of the file to 1 MB
fdoc.SaveAs("c:\\temp\\file.bin");
    
< Previous Top Next >
Copyright © 2017 HHD Software. All rights reserved.