Kbase P21518: CALL object cannot be used to run a DLL routine.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/03/2010 |
|
Status: Verified
SYMPTOM(s):
CALL object cannot be used to run a DLL routine.
DLL routine is defined using 'PROCEDURE [procedurename] EXTERNAL "[dllname]"'
Using the INVOKE method causes a GPF
FACT(s) (Environment):
Progress 9.1x
OpenEdge 10.x
OpenEdge 10.1x
All Supported Operating Systems
CAUSE:
Enhancement Request# OE00087562
FIX:
Enhancement Request# OE00087562 has been implemented.
Upgrade to OpenEdge 10.2B or later
New features have been added to the CALL object that allows it to dynamically invoke any DLL routine, without requiring a defined entry point in the ABL code.
Workaround:
- Create an ABL internal procedure with parameters that match the DLL routine, and that calls the DLL routine. For example:
PROCEDURE ExternalProc EXTERNAL "example.dll":
DEFINE INPUT PARAMETER iInput AS LONG.
DEFINE RETURN PARAMETER iOutput AS SHORT.
END.
PROCEDURE wrapExternalProc:
DEFINE INPUT PARAMETER iInput AS INTEGER.
DEFINE OUTPUT PARAMETER iOutput AS INTEGER.
RUN ExternalProc (INPUT iInput, OUTPUT iOutput).
END PROCEDURE.
- Reference that "wrapper" procedure with the CALL object, instead of referencing the DLL routine directly.