Document Functions

Open, Close, Save APIs

HWAPI HWDOCUMENT hwOpenDocument (HWSESSION hSession, LPCTSTR lpstrFile, BOOL bReadOnly)
 Open an existing document.
HWAPI HWDOCUMENT hwNewDocument (HWSESSION hSession)
 Create a new empty document.
HWAPI HWAPI_RESULT hwSaveDocument (HWDOCUMENT hDocument)
 Save document.
HWAPI HWAPI_RESULT hwSaveDocumentAs (HWDOCUMENT hDocument, LPCTSTR szFileName)
 Save Document as under the specified file name.
HWAPI HWAPI_RESULT hwCloseDocument (HWDOCUMENT hDocument)
 Close the specified document.

Property APIs

HWAPI HWAPI_RESULT hwGetDocumentSize (HWDOCUMENT hDocument, QWORD *pqwFileSize)
 Get document size.
HWAPI HWAPI_RESULT hwGetFileName (HWDOCUMENT hDocument, LPTSTR lpstrFileName, size_t nFileName)
 Get the document filename.
HWAPI HWAPI_RESULT hwGetReadOnly (HWDOCUMENT hDocument, BOOL *pbReadOnly)
 Get the document read-only status.

Data Manipulation APIs

HWAPI HWAPI_RESULT hwReadAt (HWDOCUMENT hDocument, QWORD qwOffset, void *vpBuffer, QWORD qwLength)
 Read a block a data at the specified offset.
HWAPI HWAPI_RESULT hwWriteAt (HWDOCUMENT hDocument, QWORD qwOffset, void *vpBuffer, QWORD qwLength)
 Write a block of data starting at the specified offset.
HWAPI HWAPI_RESULT hwReplaceAt (HWDOCUMENT hDocument, QWORD qwOffset, void *vpBuffer, QWORD qwSrcLength, QWORD qwTrgLength)
 Replace data at the specified offset.
HWAPI HWAPI_RESULT hwInsertAt (HWDOCUMENT hDocument, QWORD qwOffset, void *vpBuffer, QWORD qwLength)
 Insert data at the specified offset.
HWAPI HWAPI_RESULT hwDeleteAt (HWDOCUMENT hDocument, QWORD qwOffset, QWORD qwLength)
 Delete data at the specified offset.

Undo Control APIs

HWAPI HWAPI_RESULT hwUndoEnable (HWDOCUMENT hDocument)
 Enable the Hex Workshop undo featuresEnables the Hex Workshop undo feature. By default, undo is enabled, but can be disabled by calling hwUndoDisable.
HWAPI HWAPI_RESULT hwUndoDisable (HWDOCUMENT hDocument)
 Disabled the Hex Workshop undo featureDisables the Hex Workshop undo feature. Users may want to disable undo when implementing import functions that include many operations.
HWAPI HWAPI_RESULT hwUndoBeginGroup (HWDOCUMENT hDocument)
 Begin grouping undo operationsGroups multiple document changes into a single undo operation. Groups cannot be nested -- calling this API twice, without calling hwUndoEndGroup results in an error.
HWAPI HWAPI_RESULT hwUndoEndGroup (HWDOCUMENT hDocument)
 Stop grouping undo operationsStop grouping document changes into a single undo operation and commit the undo group.

Function Documentation

HWAPI HWAPI_RESULT hwCloseDocument ( HWDOCUMENT  hDocument )
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwDeleteAt ( HWDOCUMENT  hDocument,
QWORD  qwOffset,
QWORD  qwLength 
)
Parameters:
hDocument[IN] Hex Workshop document handle
qwOffset[IN] Starting offset location
qwLength[IN] Length of data to delete in bytes
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwGetDocumentSize ( HWDOCUMENT  hDocument,
QWORD pqwFileSize 
)
Parameters:
hDocument[IN] Hex Workshop document handle
pqwFileSize[OUT] Size of the document in bytes
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwGetFileName ( HWDOCUMENT  hDocument,
LPTSTR  lpstrFileName,
size_t  nFileName 
)
Parameters:
hDocument[IN] Hex Workshop document handle
lpstrFileName[OUT] Buffer to place filename
nFileName[IN] Size of the buffer in TCHARs
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwGetReadOnly ( HWDOCUMENT  hDocument,
BOOL *  pbReadOnly 
)
Parameters:
hDocument[IN] Hex Workshop document handle
pbReadOnly[OUT] TRUE if readonly otherwise FALSE
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwInsertAt ( HWDOCUMENT  hDocument,
QWORD  qwOffset,
void *  vpBuffer,
QWORD  qwLength 
)
Parameters:
hDocument[IN] Hex Workshop document handle
qwOffset[IN] Starting offset location
vpBuffer[IN] Data Buffer
qwLength[IN] Length of data buffer in bytes
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWDOCUMENT hwNewDocument ( HWSESSION  hSession )
Parameters:
hSession[IN] Hex Workshop Plug-in session handle
Returns:
NULL on error or a non-NULL value on success
HWAPI HWDOCUMENT hwOpenDocument ( HWSESSION  hSession,
LPCTSTR  lpstrFile,
BOOL  bReadOnly 
)
Parameters:
hSession[IN] Hex Workshop Plug-in session handle
lpstrFile[IN] Path to file
bReadOnly[IN] TRUE to open read-only, FALSE for write access
Returns:
NULL if unable to open a file or a non-NULL value on success
HWAPI HWAPI_RESULT hwReadAt ( HWDOCUMENT  hDocument,
QWORD  qwOffset,
void *  vpBuffer,
QWORD  qwLength 
)
Parameters:
hDocument[IN] Hex Workshop document handle
qwOffset[IN] Starting offset location
vpBuffer[OUT] Data Buffer
qwLength[IN] Length of data buffer in bytes
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwReplaceAt ( HWDOCUMENT  hDocument,
QWORD  qwOffset,
void *  vpBuffer,
QWORD  qwSrcLength,
QWORD  qwTrgLength 
)
Parameters:
hDocument[IN] Hex Workshop document handle
qwOffset[IN] Starting offset location
vpBuffer[IN] Data Buffer
qwSrcLength[IN] Length of the data to replace in bytes (original data)
qwTrgLength[IN] Length of vpBuffer in bytes (target or new data)
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwSaveDocument ( HWDOCUMENT  hDocument )
Note:
Use hwSaveDocumentAs for document created using hwNewDocument
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwSaveDocumentAs ( HWDOCUMENT  hDocument,
LPCTSTR  szFileName 
)
Note:
If the file exists, the user is prompted to overwrite.
Parameters:
hDocument[IN] Hex Workshop document handle
szFileName[IN] Full path to destination file
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwUndoBeginGroup ( HWDOCUMENT  hDocument )
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwUndoDisable ( HWDOCUMENT  hDocument )
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwUndoEnable ( HWDOCUMENT  hDocument )
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwUndoEndGroup ( HWDOCUMENT  hDocument )
Parameters:
hDocument[IN] Hex Workshop document handle
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes
HWAPI HWAPI_RESULT hwWriteAt ( HWDOCUMENT  hDocument,
QWORD  qwOffset,
void *  vpBuffer,
QWORD  qwLength 
)
Note:
This operation will overwrite data in the document
Parameters:
hDocument[IN] Hex Workshop document handle
qwOffset[IN] Starting offset location
vpBuffer[IN] Data Buffer
qwLength[IN] Length of data buffer in bytes
Returns:
HWAPI_RESULT_SUCCESS on success, otherwise see hwapierr.h for error codes

Copyright © 2010 BreakPoint Software, Inc. All Right Reserved.
Generated on Sat Jan 1 2011 07:53:51 for Hex Workshop Plug-in API by doxygen 1.7.2