|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
API exit - queue name extract |
« View previous topic :: View next topic » |
Author |
Message
|
luvmq |
Posted: Sat Jul 17, 2004 6:01 pm Post subject: API exit - queue name extract |
|
|
Newbie
Joined: 26 May 2004 Posts: 7
|
Hi,
Can someone help me extract the queue name from the following API functions
void MQENTRY GetBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PPMQMD ppMsgDesc
, PPMQGMO ppGetMsgOpts
, PMQLONG pBufferLength
, PPMQVOID ppBuffer
, PPMQLONG ppDataLength
, PMQLONG pCompCode
, PMQLONG pReason
)
void MQENTRY InqBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PMQLONG pSelectorCount
, PPMQLONG ppSelectors
, PMQLONG pIntAttrCount
, PPMQLONG ppIntAttrs
, PMQLONG pCharAttrLength
, PPMQCHAR ppCharAttrs
, PMQLONG pCompCode
, PMQLONG pReason
)
void MQENTRY PutBefore ( PMQAXP pExitParms
, PMQAXC pExitContext
, PMQHCONN pHconn
, PMQHOBJ pHobj
, PPMQMD ppMsgDesc
, PPMQPMO ppPutMsgOpts
, PMQLONG pBufferLength
, PPMQVOID ppBuffer
, PMQLONG pCompCode
, PMQLONG pReason
)
I need to log in the queue name and the user id . I was able to get the userid but not able to get the queue name.
Thanks |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sat Jul 17, 2004 9:22 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Standard MQ programming stuff.
In a normal MQOpen, how do you specify the queue name? Hint: Look in PMQHOBJ.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
luvmq |
Posted: Mon Jul 19, 2004 4:36 am Post subject: |
|
|
Newbie
Joined: 26 May 2004 Posts: 7
|
Thanks Roger, I think I'm missing something here. I do understand that MQHOBJ points to the queue that is opened. I was able to extract the queue name for the OPEN API since I would take it directly from MQOD. Since MQHOBJ is a handle I wasn't sure how to code in C and extract the queue name. I guess I wasn't clear enough. Hope this explains where I'm exactly facing an issue.
Thanks. |
|
Back to top |
|
 |
clindsey |
Posted: Mon Jul 19, 2004 5:33 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
You can only get the queue name during open before and after.
You have to store it as an association to the object handle and then do a lookup when you need it for the other api calls.
I can make this easy for you. I implemented this technique in the mirrorq sample. Download mirrorq1_win.zip from http://www.developer.ibm.com/tech/sampmq.html and look at the mirrorq.c source code. It uses a link list to save the object handles and queue names. You should be able to reuse much of this code.
Charlie |
|
Back to top |
|
 |
luvmq |
Posted: Tue Jul 20, 2004 11:51 am Post subject: |
|
|
Newbie
Joined: 26 May 2004 Posts: 7
|
Thanks Charlie,
The sample code helped a lot. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|