Consultor Eletrônico



Kbase P38178: Failed to open or write to serial device when calling a DLL
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/20/2003
Status: Unverified

SYMPTOM(s):

Attempting to print to a fiscal printer from Progress 4GL.

The model of the fiscal printer being used is elgin ecfif5001e.

Using a Windows dynamic link library (DLL) routine called ecf32m.dll to print to the fiscal printer.

One of the procedures defined as external returns error code -87, which is an internal code specific to the ecf32m.dll.

Failed to open or write to serial device (-87).

CAUSE:

The DLL routine for opening the COM port was not remaining loaded in memory.

FIX:

Use the PERSISTENT option with the PROCEDURE 4GL Statement so that the procedures defined as external remain loaded in memory until Progress exits or the session executes the RELEASE EXTERNAL statement.