Creating add-ins with Native API technology
Use this technology to create add-ins that can be attached to client applications and 1C:Enterprise servers on Windows, Linux, Windows Runtime, Android, and iOS platform versions.
The user interface is not available for Windows Runtine, Android, and iOS.
An add-in implements one or several objects availlable for use from 1C:Enterprise. Each add-in object must inherit the IComponentBase abstract class and implement all of its methods. The ComponentBase.h file is included in the distribution kit.
An add-in developed using this technology must export the following four functions from the library:
Gets the list of add-in object names.
const WCHAR_T* GetClassNames();
An array with a list of add-in object names.
Creates an instance of the add-in object.
long GetClassObject(const WCHAR_T* clsName, IComponentBase** pIntf);
Type: const WCHAR_T*. Name of the object being created.
Type: IComponentBase**. Pointer to the variable that will store the address of the created object.
- 0 - the object cannot be created or the object with the specified name is not found.
nonzero value - the object is created.
Deletes an instance of a previously created object. The add-in must delete the object and release the memory using its own tools.
long DestroyObject(IComponentBase** pIntf);
Type: IComponentBase**. Pointer to the add-in object.
- 0 - successful completion.
error code (Runtime error) - errors occurred.
Sets the version of supported platform capabilities. If the function is not implemented, the add-in cannot display messages and request platform information.
AppCapabilities SetPlatformCapabilities(const AppCapabilities capabilities);
Type: AppCapabilities enumeration. Enumeration values: eAppCapabilitiesInvalid = -1, eAppCapabilities1 = 1, eAppCapabilitiesLast = eAppCapabilities1.
The version of supported platform capablities.