User Defined Data Type Query


[ Follow Ups ] [ BasicCard User Forum ]

Posted by nickl (82.153.87.1) on January 06, 2007 at 16:51:47:

I have this:

Type AA20
bytRecordNumber as byte
lngRestNumber as long
bytRestCardSeq as byte
strTranType as string*1
lngTranValue as long
lngResultantBal as long
End Type

Command &H80 &H27 ConfirmTransaction (objAA20 as AA20)
objAA20.bytRecordNumber = 0
objAA20.lngRestNumber = 1
objAA20.bytRestCardSeq = 2
objAA20.strTranType = "H"
objAA20.lngTranValue = 3
objAA20.lngResultantBal = 4
End Command

I am then executing an APDU on a hand-held device to call the command. I would expect to see the following bytes returned:

00 00 00 00 01 02 48 00 00 00 03 00 00 00 04 90 00

But, what I am actually getting is:

48 00 00 00 01 02 00 00 00 00 03 00 00 00 04 90 00

So, looking as if the "H" is for some reason being returned first and not in
the "right" place. Thoughts welcome.

Oddly, this one:

Type AA10
bytRecordNumber as byte
lngRestNumber as long
strRestName as string*20
lngBal as long
bytStatus as byte
End Type

appears to work correctly.

Clues welcome. Thanks in advance,

Nick



Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]