Consultor Eletrônico



Kbase P134868: How to use a DLL .Net as a class from 4GL
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/09/2008
Status: Verified

GOAL:

How to use a DLL .Net as a class from 4GL

FACT(s) (Environment):

OpenEdge Category: Language (4GL/ABL)
OpenEdge 10.x
Windows
Windows 32 Intel

FIX:

Run the assembly COM wrapper provided with the DLL in way to register the DLL as a COM object.
This is an example of what is provided with the DLL.
rem sn -k keyfile.snk
tlbexp C:\usr\apps\progress\common\oe2.net\myDotNetLib\bin\Release\myDotNetLib.dll /out:.\myDotNetLib.tlb
regasm /tlb=.\myDotNetLib.tlb C:\usr\apps\progress\common\oe2.net\myDotNetLib\bin\Release\myDotNetLib.dll
gacutil /if C:\usr\apps\progress\common\oe2.net\myDotNetLib\bin\Release\myDotNetLib.dll
Access the DLL's APIs as if they were a COM Object.
Here is a sample 4GL procedure.
DEF VAR hDate AS COM-HANDLE.
CREATE "myTestLib.DateHelper" hDate.
MESSAGE hDate:getDateString() VIEW-AS ALERT-BOX.
RELEASE OBJECT hDate.