Hex Editor
Hex Editor - Binary File Editing Software for Windows

IMultiSelection.RemoveRange Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  RemoveRange ( [in]   ulong  Offset, [in]   ulong  Size) ;
Native (C++):
HRESULT  RemoveRange ( [in]   unsigned __int64  Offset, [in]   unsigned __int64  Size) ;
Parameters
OffsetStarting offsetSizeRange size
Return Value
S_OK or standard OLE error code.
Remarks
Removes a given range from the selection. The specified range is "subtracted" from any intersected selection's ranges. If it does not intersect any range, nothing happens. The number of ranges in selection object may change after this method returns. Complexity: linear-time, depending on the current selection configuration.
Examples

Removing ranges from a selection

C#Copy Code
// msel is initialized elsewhere and is currently empty
msel.AddRange(100, 50);  // selection: [100..150)
msel.RemoveRange(100, 10);  // selection: [110..150)
msel.RemoveRange(0, 10);  // selection: [110..150) - nothing changed
msel.RemoveRange(150, 20);  // selection: [110..150) - nothing changed
msel.RemoveRange(120, 10);  // selection: [110..120) U [130..150)
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.