Search code examples
c#progress-4glopenedgedllregistration

Use .NET dll (class library C#) in 4GL


I want to use a .NET class library written in C# in the 4GL Progress OpenEdge but I did not find good, working example. Progress says it's possible to do what I want to do, but it doesn't work.


Solution

  • Depending on version of Progress it might be possible to call the .Net class natively in the 4GL. However there are some limits to this. Progress for instance is very single threaded and cannot handle multi threaded .Net classes (for instance if an event occurs in a second thread). Basic support was added somewhere around 10.2B but has later been increased.

    You can look at these (large) documents:

    They are mostly about GUI programming but can be used as a reference.

    The first thing you need to do is set up an assemblies.xml-file to add your component/class to your environment. After that it depends on your specific class but basic OOPABL is "quite" straightforward.

    DEFINE VARIABLE c AS CLASS System.Collections.ArrayList.
    c = NEW System.Collections.ArrayList().