Hello community,
at the moment I code a COM library to access an SAP system via SAP NetWeaver RFC library. Now I work with C structures, because the RFC library is originally coded in C. If I call a function with an array of bytes and look at the result, I see that the byte order of the elements are different from PowerBASIC. E.g. I use the function RfcGetFieldDescByIndex to get a field description of an SAP table. The result is in a C structure, e.g. the type of the field as a word. If I use the PB function Peek(Word, ...) I get 0x0600 but the correct value is 0x0006 - RFCTYPE_NUM. Now my questions:
Cheers
Stefan
at the moment I code a COM library to access an SAP system via SAP NetWeaver RFC library. Now I work with C structures, because the RFC library is originally coded in C. If I call a function with an array of bytes and look at the result, I see that the byte order of the elements are different from PowerBASIC. E.g. I use the function RfcGetFieldDescByIndex to get a field description of an SAP table. The result is in a C structure, e.g. the type of the field as a word. If I use the PB function Peek(Word, ...) I get 0x0600 but the correct value is 0x0006 - RFCTYPE_NUM. Now my questions:
- Stores C all values in another byte order as PowerBASIC - also pointer?
- Now I use this function to get the correct value:
Code:Method PokeWStruc(ByVal memoryAddr As Long, ByVal value As Word) Poke Byte, memoryAddr, Hi(Byte, value) Poke Byte, memoryAddr + 1, Lo(Byte, value) End Method
Cheers
Stefan
Comment