I have the following structs defined. I ultimately want to copy UserInfo into a BYTE buffer to send to an RS232 serial port.
typedef struct
u_32 prot_ver;
u_32 nomem_ver
u_32 func_units;
u_32 sysType;
u_32 startupMode
AttributeList option_list;
AttributeList supported_aprofiles;
} UserInfo
typedef struct
u_16 attribute_id;
u_16 length;
u_16 attribute_val;
} AVAType
typedef struct
u_16 count;
u_16 length;
AVAType value[1]
} AttributeList
I have a buffe
msgBuffer = new BYTE [1000]
and i'm tryin to do
memcpy (msgBuffer, (BYTE *) &UserInfo, sizeof (UserInfo)
The first 5 fields copy, but the AttributeList struct field dont copy immediately behind the u_32 in my msgBuffer. :
I basically need the 'count' field of the AttributeList immediately behind the 'StartupMode' field
Some its not copying right. :( HELP?!?!?!?!??
-C