Hex Editor
Hex Editor - Binary File Editing Software for Windows

IMultiSelection.Invert Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  Invert ( [in]   ulong  Size) ;
Native (C++):
HRESULT  Invert ( [in]   unsigned __int64  Size) ;
Parameters
SizeThe total size of an object. Used to properly invert selection.
Return Value
S_OK or standard OLE error code.
Remarks
Inverts the current selection. All defined ranges become gaps and all gaps become ranges. This method accepts the total size which is usually the current file's size. Calling Invert method two times with a same Size value will leave the selection object intact. Complexity: constant-time.
Examples

Using the Invert method

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