Ticket #6 (closed Task: fixed)

Opened 6 years ago

Last modified 6 years ago

Allow GeoEco classes to be exposed as COM components

Reported by: jjr8 Owned by: jjr8
Priority: High Milestone: 0.1
Component: Core - Other Version: null
Keywords: Cc:

Description (last modified by jjr8) (diff)

There are several complex changes required:

  • setup.py should automatically assign COM CLSIDs and/or IIDs. The CLSIDs and/or IIDs should persist and not change from release to release.
  • The base modules should set the class attributes needed by pythoncom so it will create instance of the class when someone CoCreates? its CLSID
  • The base modules should wrap all tool calls so that when a class raises a Python exception, it is translated into an appropriate COM exception
  • GeoEcoPostInstall?.py (generated by setup.py) should perform the COM registration/unregistration at install/uninstall time

Change History

Changed 6 years ago by jjr8

  • status changed from new to assigned
  • description modified (diff)
  • summary changed from Expose tools derived from GeoEco.Tool.Tool as IDispatch components to Allow GeoEco classes to be exposed as COM components

Changed 6 years ago by jjr8

  • status changed from assigned to closed
  • resolution set to fixed

The bulk of this work was implemented in [25].

CLSIDs and IIDs are not automatically assigned. They must be specified in the class's metadata by the developer. setup.py enforces this and when it reports an error to the developer, it generates GUIDs that the developer can use.

Classes do not need to derive from GeoEco?.Tool.Tool in order to be exposed through COM. The GeoEco?.Tool module was eliminated. Classes need only be instrumented with appropriate metadata.

setup.py builds a COM type library and classes can be instantiated through IDispatch (late binding) or through regular COM ("vtable" or early binding).

Note: See TracTickets for help on using tickets.