Hex Editor
Hex Editor - Binary File Editing Software for Windows

IMultiSelection.ToggleRange Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  ToggleRange ( [in]   ulong  Offset, [in]   ulong  Size) ;
Native (C++):
HRESULT  ToggleRange ( [in]   unsigned __int64  Offset, [in]   unsigned __int64  Size) ;
Parameters
OffsetStarting offsetSizeRange size
Return Value
S_OK or standard OLE error code.
Remarks
Current selection ranges are intersected with a specified range. Those portions of the specified range that fall onto gaps are appended to the selection, and those portions that fall to existing ranges, are subtracted from the selection. Complexity: linear-time, depending on the current selection configuration. Complexity of this method is not worse than that of IMultiSelection.AddRange and IMultiSelection.RemoveRange
Examples

Using ToggleRange method

C#Copy Code
// msel is initialized elsewhere and is currently empty
msel.ToggleRange(100, 50);  // selection: [100..150)
msel.ToggleRange(100, 10);  // selection: [110..150)
msel.ToggleRange(0, 10);  // selection: [0..10) U [110..150)
msel.ToggleRange(140, 20);  // selection: [0..10) U [110..140) U [150..160)
msel.ToggleRange(10, 100);  // selection: [0..140) U [150..160)
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.