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.
|
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