Installs a callback for handling command calls from other add-ons.
GSErrCode ACAPI_Install_ModulCommandHandler ( GSType cmdID, Int32 cmdVersion, APIModulCommandProc* handlerProc );
Parameters
- cmdID
- [in] An identifier of the command to install the callback procedure for. This should be the same what you used in the ACAPI_Register_SupportedService as the command identifier in the RegisterInterface function.
- cmdVersion
- [in] An identifier of the command to install the callback procedure for. This should be the same what you used in the ACAPI_Register_SupportedService as the command version number in the RegisterInterface function.
- handlerProc
- [in] The callback function to handle the command calls.
Return Values
NoError
- The function has completed with success.
For other common API errors see the API Errors document.
Remarks
This function should be called in the Initialize function of your add-on. It installs the callback function which is called when the other add-ons would like to use the supported services of your add-on.
Example
// ----------------------------------------------------------------------------- // Called when the add-on has been loaded into memory // ----------------------------------------------------------------------------- GSErrCode __ACENV_CALL Initialize (void) { GSErrCode err = NoError; err = ACAPI_Install_ModulCommandHandler ('DWFI', 1, APIModulCommandProc); return err; } // Initialize
Requirements
- Version: API 4.1 or later
- Header: ACAPinc.h
See Also
ACAPI_Register_SupportedService, APIModulCommandProc,
API Functions