Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.InsertS Method

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

Inserts a pattern into the document. 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.Write 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.InsertS(pattern, 100);  // insert a given pattern at the offset 100
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.