Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mqput message identifier

Status
Not open for further replies.

maddogpat

MIS
Jul 18, 2005
1
ZA
hello,

i need to replace the default message id with a specific requirement. I understand the byte concept etc, but how do I actually change the value in c? I know MQMI_NONE sets it to the default.

memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId) );

How would I now insert my own value?

any help much appreciated!

thanks
 
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId) );
memcpy(md.MsgId, yourvalue, sizeof(yourvalue) );

The first line clears out message-id, the second line populates it with yourvalue. If yourvalue is always 24 bytes, then you don't need the first line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top