IO-PORT Communication met .dll in .net framework environment

Posted by helpdesk3600 on 08-May-2012 10:03

/* following script is accessing an EFTCOM.DLL that is needed for the communication between our KASSA system and a PAYMENT TERMINAL in our shop. */

/*  working with progress 10.2B on a windows 7 pc */

/*  the new version of the EFTCOM.DLL is written in .NET FRAMEWORK and I have to do the same thing... */

/* Now I have a problem with calling the EftInitTerminal() method, because progress says that this method cannot be found  */

/*  what should I do ?  Upgrade to progress 10.2B service pack 6 */

/* Can anybody help me ? */

/* script */

DEF NEW SHARED VAR hEFTobj AS COM-HANDLE.

CREATE "EFTCOM.EFT" hEFTobj.
  

IF NOT VALID-HANDLE(hEFTobj) THEN RETURN.

NO-RETURN-VALUE hEFTobj:EftInitTerminal().

DO WHILE hEFTobj:StillExecuting:
        PROCESS EVENTS.
END.

   

IF hEFTobj:ReasonCode NE 0
THEN MESSAGE "EFT: Technical Problem (" + STRING(hEFTobj:ReasonCode) + ")"
                      VIEW-AS ALERT-BOX WARNING.

All Replies

Posted by Peter Judge on 08-May-2012 10:26

Berno,

The first question I have is which development environment you are working in? Hopefully OpenEdge Architect.

From your email, it looks like you're trying to access the DLL with a handle, as if it were a COM object. The syntax for OO is slightly different. The page at http://communities.progress.com/pcom/community/psdn/openedge/gui4dotnet has some useful links (I believe) that can help you get started.

You should also look at the documentation on the -assemblies parameter. Also, you will either need to put the DLL in the GAC or in your working directory.

-- peter

Posted by helpdesk3600 on 09-May-2012 01:46

Dear Peter,

We are working in the OPENEDGE 10.2B environment without architect on our server.

And on our standalone clients, where the integration should take place, we are also working in the OPENEDGE 10.2B environment without the architect.

I am the only programmer...

Mvg,

Berno

Posted by Stefan Marquardt on 09-May-2012 01:58

NO-RETURN-VALUE hEFTobj:EftInitTerminal().

DO WHILE hEFTobj:StillExecuting:
        PROCESS EVENTS.
END.

   

If it's a real .NET assembly your need to use it as object with NEW and not CREATE for COM.

OT: This actual code (for COM) could let your application running in fast loop with high CPU if EFTInitTerminal is really "coming back" before it finishes ...

This thread is closed