Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.Fill Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  Fill ( [in]   ref byte  pPattern, [in]   uint  pattern_size, [in]   ulong  off, [in]   ulong  Size) ;
Native (C++):
HRESULT  Fill ( [in]   unsigned char *  pPattern, [in]   unsigned long  pattern_size, [in]   unsigned __int64  off, [in]   unsigned __int64  Size) ;
Parameters
pPatternPointer to a patternpattern_sizePattern sizeoffRange starting offsetSizeRange size
Return Value
S_OK or standard OLE error code.
Remarks
Fills a given range with a given pattern. A pattern is repeated until the required number of bytes is written to the file. If file is shorter than the filling range, the file's size is increased. Complexity: constant-time.
Examples

Filling a range with a simple pattern

C++Copy Code
// pFileDocument is initialized elsewhere
unsigned char Pattern[]="Simple Pattern";
HRESULT hRes = pFileDocument->Fill(Pattern, sizeof(Pattern), 0x10000i64, 0x10ffi64);
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.