Kbase P169066: Accessing EXTERNAL DLL in procedure and passing 58134 through a parameter defined as SHORT used to w
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/1/2010 |
|
Status: Unverified
SYMPTOM(s):
Accessing EXTERNAL DLL in procedure and passing 58134 through a parameter defined as SHORT used to work in 10.1A but fails in 10.2B
Value does not fit in DLL datatype. (13712)
Value 58134 does not fit in DLL datatype. (13712)
FACT(s) (Environment):
Windows
OpenEdge 10.1A
OpenEdge 10.2B
CAUSE:
In OpenEdge Release 10.1B validation was added to ensure that values passed in EXTERNAL PROCEDURE calls fit in the defined data type. SHORT is, by default, SIGNED-SHORT and values greater than 32167 bytes do not fit. Any code written prior to 10.1B got away with passing values up to 65334 bytes, as long as the external data type was defined in the DLL as an unsigned short.
FIX:
Change SHORT data-type definitions in EXTERNAL PROCEDURE calls that are greater than 32167 to UNSIGNED-SHORT.
e.g.
PROCEDURE <foo> EXTERNAL <dll>:
DEFINE INPUT PARAMETER iBuffer AS UNSIGNED-SHORT.
END PROCEDURE.