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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQGET problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm trying to remove a specific message in a queue but I am not able to specify the messageId which should be use. I know I should use the
MQGetMessageOptions.MatchOptions = MQMO_MATCH_MSG_ID but not how to let it know the id of the message I'm looking for.
This is for NT/VB6.0 (I'm not really proud of it).
Thanks all,
Antoine
 
I have done it in C and not sure how it is done in VB, but
in MQGET function specify the following values:

/*Set MatchOptoons to search by Correlation ID , this is in a GET Message Option Attribute*/
gmo.MatchOptions = MQMO_MATCH_CORREL_ID;

/*Copy the message id from MQPUT into a Correlation Id in MQGET in a Message Descriptor*/
memcpy(md.CorrelId, MsgId, MQ_CORREL_ID_LENGTH);

/* Then null the message id with MQMI_NONE */
memcpy(md.MsgId,MQMI_NONE, MQ_MSG_ID_LENGTH);

Then do MQGET.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top