Step-by-step: Expose VisualAPL Functions as COM

General discussions related to APLNext's VisualAPL.

Moderators: Tech Support, phpbb_admin

Step-by-step: Expose VisualAPL Functions as COM

Postby joe_blaze » April 19th, 2009, 12:59 am

The attached .pdf-format document provides a step-by-step example which exposes VisualAPL functions in a .Net assembly as COM (ActiveX).

Exposing VisualAPL functions as COM can be useful when:

    .Net capabilities are needed in the Win32 environment of APL+Win
    Avoiding duplicate maintenance of business rules functions used in both the legacy APL+Win and VisualAPL application systems
    .Net GUI features are used to freshen the APL+Win application's GUI


The attached .zip-format file contains the VisualAPL for Visual Studio 2008 project used in this example.

If you want to know (maybe too much) more about .Net / COM interoperability go to: http://www.codeproject.com/KB/COM/comin ... view=Quick
Attachments
APLN.Area.zip
(1.14 MiB) Downloaded 325 times
Expose VisualAPL Net Assembly as COM.pdf
(979.31 KiB) Downloaded 339 times
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361

Deployment of a .Net Assembly Exposed as COM

Postby joe_blaze » April 19th, 2009, 4:00 pm

When deploying a .Net assembly exposed as COM the Microsoft REGASM tool can be used to register the COM object exposed by the .Net assembly. The tool can be used manually or incorporated into a Command Prompt (.bat) file. Go here for the Microsoft documentation of this important tool:
http://msdn.microsoft.com/en-us/library/tzat5yw6.aspx. The REGASM tool may also be used to unregister a .Net assembly exposed as COM, e.g. RegAsm Assembly_Full_Filename /unregister from the Windows Command Prompt window.

A more "professional" approach would be to create a Microsoft Visual Studio deployment project to create a .msi-format (Microsoft installer) file to install the .Net assembly exposed as COM. This .msi installer may be used for local installation or published to a web server for 1-click installation from the web url.
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361


Return to VisualAPL

Who is online

Users browsing this forum: No registered users and 21 guests

cron