Hex Editor
Hex Editor - Binary File Editing Software for Windows

IMultiSelection.InsertRange Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  InsertRange ( [in]   ulong  Offset, [in]   ulong  Size) ;
Native (C++):
HRESULT  InsertRange ( [in]   unsigned __int64  Offset, [in]   unsigned __int64  Size) ;
Parameters
OffsetInsert offsetSizeInser size
Return Value
S_OK or standard OLE error code.
Remarks
Inserts a range into the selection object. As a result of this operation, existing ranges with offsets larger than Offset are shifted forward by Size bytes. Complexity: linear-time, depending on the number of ranges to shift.
Examples

Using the InsertRange method

JavaScriptCopy Code
var fdoc = new ActiveXObject("FileDocument.FileDocument");
var msel = fdoc.CreateEmptySelection();
msel.AddRange(100, 20);  // selection: [100..120)
msel.AddRange(150, 20);  // selection: [100..120) U [150..170)
msel.InsertRange(130, 10); // selection: [100..120) U [160..180)
msel.InsertRange(0, 20); // selection: [120..140) U [180..200)
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.