A plug-in method
When an INVOICES module starts, it loads all plug-ins listed in Eilocal.ini. INVOICES requires that the plug-in has a method called Connect that has this signature. This is the one and only time your plug-in gets access to INVOICES’ Application object.
Every plug-in must contain this method with exactly this signature. You always receive the COM application object, which consists of one of these objects: ManagerApp, ScanApp, InterpretApp, VerifyApp, TransferApp.
When running on the newer operating systems, an existing implementation of the IsVistaConverted method in the plug-in’s main class object is required. In this case, the formal parameters strInifile and strIniSection do not contain any actual values in the Connect method’s call. Instead, use the Configuration property of the Application object for configuration data management.
See also: Migrating INVOICES customizations to recent operating systems
EV_OK – Connection accepted
EV_ERROR – Connection canceled
Function Connect(ByRef ehApp As Object, ByRef strInifile As String, ByRef strIniSection As String) As Long
'Setup global App object
Set gItrpApp = ehApp
'Time to subscribe to all events you like
Call EventSubscribe
Connect = EV_OK
End Function
Always save a reference to INVOICES’ Application object and subscribe to those events you are interested in.
Plug-in methods to use in INVOICES extensions