Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.InsertPatternS Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  InsertPatternS ( [in]   ISequence  pSequence, [in]   ulong  off, [in]   ulong  Size) ;
Native (C++):
HRESULT  InsertPatternS ( [in]   ISequence *  pSequence, [in]   unsigned __int64  off, [in]   unsigned __int64  Size) ;
Parameters
pSequenceSequence object containing data to insert.offInsert offsetSizeInsert size
Return Value
S_OK or standard OLE error code.
Remarks

Inserts a given pattern into the document, repeating it to fill the given size. Insert command shifts file's data to free up the space to fit an inserted pattern. Complexity: constant-time.

This method is a replacement for IFileDocument.InsertPattern when used in scripting languages.

Examples

Inserting a pattern

JavascriptCopy Code
// fdoc is initialized elsewhere
var pattern = fdoc.CreateSequence();
pattern.AddData(HexBytes, 0x0d, 0x0a);
fdoc.InsertPatternS(pattern, 100, 1000);
  
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.