Problem:
The following CALL crashes with a runtime error 114.
"GetParameter" is a C-function in a DLL created by Visual C .
01 buffer pic x(32000).
01 len binary-long value 32000.
CALL WinApi "GetParameter"
using by reference buffer
by value len
Resolution:
For modifying a buffer with this kind of DLL, it requires a pointer to a buffer.
01 buffer pic x(32000).
01 len usage binary-long value 32000.
01 ptr usage pointer.
SET ptr TO ADDRESS buffer.
CALL WinApi "GetParameter"
using by reference ptr
by value len
In a C program buffer might be specified as char **buffer;