Kbase P111658: Error (11410) when trying to pass an array variable to an external DLL function
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/12/2005 |
|
Status: Unverified
FACT(s) (Environment):
Windows
OpenEdge 10.0B
SYMPTOM(s):
Error (11410) when trying to pass an array variable to an external DLL function
Array parameters may not be specified for DLL entry points. (11410)
The external DLL procedure defined in the 4GL takes an array as a parameter
The parameter definition within the external DLL procedure prototype contains the EXTENT option. e.g.:
PROCEDURE testArray EXTERNAL "Project1.dll":U:
DEFINE INPUT PARAMETER p-vector AS CHARACTER EXTENT 3.
END PROCEDURE.
CAUSE:
The 4GL compiler is complaining about the "EXTENT 3" in the function prototype. The prototype matches more what is in the DLL code side. There it is just getting a pointer to the first string of the array. Therefore, The EXTENT option is not needed in this case.
FIX:
Remove the "EXTENT n" option from the external DLL procedure's parameter definition. e.g.:
PROCEDURE testArray EXTERNAL "Project1.dll":U:
DEFINE INPUT PARAMETER p-vector AS CHARACTER.
END PROCEDURE.