Defines

Entrypoint Documentation

Defines

#define HWPLUGIN_CAP_FILE_REQUIRE   0x00000000
 The plug-in requires an active file to operateWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command is only enabled when file is opened and active within the editor.
#define HWPLUGIN_CAP_FILE_OPTIONAL   0x00000001
 The plug-in can operate with or without an active fileWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command is always enabled.
#define HWPLUGIN_CAP_FILE_DISALLOW   0x00000002
 The plug-in operates without an active fileWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command is disabled if a file is opened and active within the editor.
#define HWPLUGIN_CAP_FILE_AUTOEXEC   0x00000008
 The plug-in should be automatically executed based on file extensionWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command Hex Workshop calls the HWPLUGIN_RequestFileAutoexecExtensions entrypoint and will automatically run the plug-in when a file with that extension is opened.
#define HWPLUGIN_CAP_SELECTION_REQUIRE   0x00000010
 The plug-in requires an active selection within the editorWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command Hex Workshop disables the plug-in unless data is selected within the editor.
#define HWPLUGIN_CAP_SELECTION_OPTIONAL   0x00000000
 The plug-in can operate with or without an active selectionWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command is enabled regardless of editor selection state.
#define HWPLUGIN_CAP_SELECTION_DISALLOW   0x00000020
 The plug-in cannot operate with an active selectionWhen specified as part of HWPLUGIN_RequestCapabilities, the plug-in command is disabled if data is selected within the editor.
#define HWPLUGIN_CAP_NO_CANCEL   0x10000000
 The plug-in does not support cancel.

Required Entrypoints

HWAPIEP BOOL HWPLUGIN_Identify (LPTSTR lpstrPluginCommands, size_t nMaxPluginCommand)
 Called by Hex Workshop to identify a plug-inPlug-in authors are required to implement the HWPLUGIN_Identify entrypoint in their plug-in DLL and must return the plug-ins command(s) as strings. The command strings are displayed under Hex Workshop's Plug-ins menu and provided to the HWPLUGIN_RequestCapabilities and HWPLUGIN_Execute entrypoints.
HWAPIEP DWORD HWPLUGIN_RequestCapabilities (LPCTSTR lpstrPluginCommand)
 Called by Hex Workshop to determine capabilities for a pluginPlug-in authors are required to implement the HWPLUGIN_RequestCapabilities entrypoint in their plug-in DLL and must return one or more of the HWPLUGIN_CAPABILITY_ flags.
HWAPIEP BOOL HWPLUGIN_Execute (LPCTSTR lpstrPluginCommand, HWSESSION hSession, HWDOCUMENT hDocument)
 Called by Hex Workshop to execute a plug-in command.

Optional Entrypoints

HWAPIEP BOOL HWPLUGIN_RequestFileAutoexecExtensions (LPCTSTR lpstrPluginCommand, LPTSTR lpstrExtensions, size_t nExtensions)
 Called by Hex Workshop to execute a plug-in commandExtensions must be delimited by a ; and are not case sensitive. Wildcards are not supported.

Define Documentation

#define HWPLUGIN_CAP_FILE_AUTOEXEC   0x00000008
#define HWPLUGIN_CAP_FILE_DISALLOW   0x00000002
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1091 of file hwapi.h.

#define HWPLUGIN_CAP_FILE_OPTIONAL   0x00000001
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1081 of file hwapi.h.

#define HWPLUGIN_CAP_FILE_REQUIRE   0x00000000
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1071 of file hwapi.h.

#define HWPLUGIN_CAP_NO_CANCEL   0x10000000
Note:
Plug-ins are assumed (and should) support cancel. hwUpdateProgress should be used to update progress and determine if the user requested a cancel.

When specified as part of HWPLUGIN_RequestCapabilities, the cancel button is disabled in the plug-in status dialog.

See also:
HWPLUGIN_RequestCapabilities

Definition at line 1149 of file hwapi.h.

#define HWPLUGIN_CAP_SELECTION_DISALLOW   0x00000020
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1135 of file hwapi.h.

#define HWPLUGIN_CAP_SELECTION_OPTIONAL   0x00000000
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1125 of file hwapi.h.

#define HWPLUGIN_CAP_SELECTION_REQUIRE   0x00000010
See also:
HWPLUGIN_RequestCapabilities

Definition at line 1115 of file hwapi.h.


Function Documentation

HWAPIEP BOOL HWPLUGIN_Execute ( LPCTSTR  lpstrPluginCommand,
HWSESSION  hSession,
HWDOCUMENT  hDocument 
)
Note:
The hDocument handle may be NULL if HWPLUGIN_CAPABILITY_NO_DOCUMENT is specified by HWPLUGIN_RequestCapabilities
Parameters:
lpstrPluginCommand[IN] The command string supplied as part of HWPLUGIN_Identify
hSession[IN] Hex Workshop Plug-in session handle
hDocument[IN] Hex Workshop document handle
See also:
HWPLUGIN_Identify
HWPLUGIN_RequestCapabilities
HWPLUGIN_RequestFileAutoexecExtensions
Returns:
TRUE if the operation was successful, otherwise false.
HWAPIEP BOOL HWPLUGIN_Identify ( LPTSTR  lpstrPluginCommands,
size_t  nMaxPluginCommand 
)

Authors can define multiple plug-in commands or operations within a single DLL. To specify multiple commands, delimit each command with a semicolon(;).

Authors may also include a backslash (\) to create a sub-menu item for plug-ins within the Hex Workshop's plug-in menu. Only a single backslash is supported. The full command name (including the slash) is used when calling the other plug-in entrypoints.

For example:

 HWAPIEP BOOL HWPLUGIN_Identify(LPTSTR lpstrPluginCommands, 
                                size_t nMaxPluginCommand) ;
     _tcsncpy(lpstrPluginCommands, 
             _T("Plugin by Example, Inc."), 
             nMaxPluginCommand) ;
 or
     _tcsncpy(lpstrPluginCommands, 
             _T("Operation 1 by Example Inc.;Operation 2 by Example Inc.", 
             nMaxPluginCommand) ;
 or
     _tcsncpy(lpstrPluginCommands, 
             _T("Example Inc.\Operation 1;Example Inc.\Operation 2", 
             nMaxPluginCommand) ;
 
Note:
Each command string is limited to 127 characters and will be truncated to 127 characters.
See also:
HWPLUGIN_RequestCapabilities
HWPLUGIN_Execute
Parameters:
lpstrPluginCommands[OUT] A buffer to place the plug-ins command list.
nMaxPluginCommand[IN] The buffer length of lpstrPluginCommand in TCHARs. Please use _tcsncpy as the buffer size may vary.
Returns:
TRUE on success or FALSE to disable the plugin
HWAPIEP DWORD HWPLUGIN_RequestCapabilities ( LPCTSTR  lpstrPluginCommand )

HWPLUGIN_RequestCapabilities is invoked for each of the command strings specified by HWPLUGIN_Identify.

The flags are used to determine when a Plug-in command should be enabled.

For example:

     return HWPLUGIN_CAP_FILE_OPTIONAL | 
             HWPLUGIN_CAP_SELECTION_OPTIONAL ;
 
Parameters:
lpstrPluginCommand[IN] The command string provided by HWPLUGIN_Identify
See also:
HWPLUGIN_RequestCapabilities
HWPLUGIN_Execute
HWPLUGIN_RequestFileAutoexecExtensions
HWPLUGIN_CAP_FILE_REQUIRE
HWPLUGIN_CAP_FILE_OPTIONAL
HWPLUGIN_CAP_FILE_DISALLOW
HWPLUGIN_CAP_FILE_AUTOEXEC
HWPLUGIN_CAP_SELECTION_REQUIRE
HWPLUGIN_CAP_SELECTION_OPTIONAL
HWPLUGIN_CAP_SELECTION_DISALLOW
HWPLUGIN_CAP_NO_CANCEL
Returns:
One or more of the HWPLUGIN_CAP_ flags.
HWAPIEP BOOL HWPLUGIN_RequestFileAutoexecExtensions ( LPCTSTR  lpstrPluginCommand,
LPTSTR  lpstrExtensions,
size_t  nExtensions 
)

For example:

 HWAPIEP BOOL  HWPLUGIN_RequestFileAutoexecExtensions(LPCTSTR    lpstrPluginCommand,
                                                      LPTSTR     lpstrExtensions,
                                                      size_t     nExtensions) 
 {
     _tcsncpy(lpstrExtensions, _T("mpeg;mpg;mp3"), nExtensions) ;
 }
 
Note:
Only called if HWPLUGIN_CAP_FILE_AUTOEXEC is return by HWPLUGIN_RequestCapabilities
Parameters:
lpstrPluginCommand[IN] The command string supplied as part of HWPLUGIN_Identify
lpstrExtensions[OUT] List of file extensions separated by ;s
nExtensions[OUT] Size of lpstrExtension buffer in TCHARs
See also:
HWPLUGIN_Identify
HWPLUGIN_RequestCapabilities
HWPLUGIN_Execute
Returns:
TRUE if the operation was successful, otherwise false.

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