Kbase P65130: MEMPTR output parameter does not return correct value
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
FACT(s) (Environment):
Windows 32 Intel
SYMPTOM(s):
MEMPTR output parameter does not return correct value
CHANGE:
An updated DLL provided by a third part has been installed
CAUSE:
New DLL provided by a third part has a different data structure in memory than previous DLL's
FIX:
Make sure you have the latest documentation about that latest DLL provided and check if there was any change regarding how many bytes are stored for each information inside the structure, for example:
For the previous DLL the following 4GL statements were used:
run radio_recv (input-output memptrvar, output sucess).
do itab = 0 to 78.
assign carray[itab + 1] = get-long(memptrvar,(itab * 4) + 1).
end.
We can see above that probably the MEMPTR was pointing to the following structure:
1st element: 4 bytes
2nd element: 4 bytes
.
.
and so on
Looking at the documentation for the new DLL, we had the following new structure:
1st element: 1 byte
2nd element: 2 bytes
3rd element: 2 bytes
.
.
and so on
"Field" values were corrected retrieve following the new structure:
run radio_recv (input-output MEMPTRVAR, output sucess).
MESSAGE "1st element: " + string(GET-BYTE(memptrvar,1)) VIEW-AS ALERT-BOX.
MESSAGE "2nd element: " + string(GET-SHORT(memptrvar,2)) VIEW-AS ALERT-BOX.
MESSAGE "3rd element: " + string(GET-SHORT(memptrvar,4)) VIEW-AS ALERT-BOX.
MESSAGE "4th element: " + string(GET-SHORT(memptrvar,6)) VIEW-AS ALERT-BOX.
.
.
.