G
Garry Hall
Guest
You have to determine the offset and length for each field of MQOD you are trying to set, then use the appropriate PUT-* function to write it. I don't have the MQ include files to figure this out, but Google gave me a little help. MCHAR4 is a 4-byte datatype (char[4]). MQLONG is a 4 byte integer. If you wanted to set StrucId to "ODbb" and Version to 1, you would do the following: PUT-STRING(ObjDesc,1) = "ODbb". /* StrucId is at offset 0 */ PUT-LONG(ObjDesc, 5) = 1. /* Version starts at offset 4, because StrucId is 4 bytes */ For historical reasons, OpenEdge MEMPTR offsets are 1-based, not 0-based. This might also require an understanding of datatype alignment, and possibly an endianness considerations of the API. Once you start calling DLLs, you have to do a lot of the heavy lifting yourself.
Continue reading...
Continue reading...