In this function the add-on can register its services, and menu commands.
GSErrCode RegisterInterface ( void );
Return Values
NoError
- The function has completed with success.
For other common API errors see the API Errors document.
Remarks
This function registers the different services of your add-on: menu commands, file types, commands other add-on can call, toolbox items, or library part subtypes. Here you can obtain information on the server application, on the protection, and the availability of the services of other add-ons as well; and adjust the registration depending on this information.
The actual callback functions which handle the events and notifications coming from the server application are installed in the Initialize function of your add-on.
Example
// ----------------------------------------------------------------------------- // Interface definitions // ----------------------------------------------------------------------------- GSErrCode __ACDLL_CALL RegisterInterface (void) { // // Register menu // GSErrCode err = ACAPI_Register_Menu (32500, 32501, MenuCode_Options1, MenuFlag_Default); if (err != NoError) return err; // // Register an IO // err = ACAPI_Register_FileType (1, 'GSAC', ' DWF', "dwf", 0, 32500, 1, SaveAs2DSupported + Open2DSupported + Merge2DSupported); return err; } // RegisterInterface
Requirements
- Version: API 4.1 or later
- Header: ACAPinc.h
See Also
Initialize, ACAPI_Register_Menu, ACAPI_Register_FileType, ACAPI_Register_ESYM, ACAPI_Register_PropertyObjectHandler, API Functions