Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.Delete Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
void  Delete ( [in]   ulong  off, [in]   ulong  Size) ;
Native (C++):
HRESULT  Delete ( [in]   unsigned __int64  off, [in]   unsigned __int64  Size) ;
Parameters
offRange offsetSizeRange size
Return Value
S_OK or standard OLE error code.
Remarks
Deletes the given range from the document. Complexity: constant-time.
Examples

Deleting document's data

C++Copy Code
CComPtr<IFileDocument> pFileDocument;
if (SUCCEEDED(pFileDocument.CoCreateInstance(_T("FileDocument.FileDocument"))))
{
  if (SUCCEEDED(pFileDocument->Open(_T("c:\\temp\\file.bin"),VARIANT_FALSE)))
  {
    pFileDocument->Delete(0x50,0x2a);
    pFileDocument->Save(false);
  }
}
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.