Author |
Message
|
mqwf |
Posted: Tue Dec 10, 2002 10:06 pm Post subject: Programming of MQseries in C and C++ |
|
|
 Acolyte
Joined: 10 Oct 2002 Posts: 62
|
Hi has anyone written MQAI programs in C then plz reply cause i have a doubt |
|
Back to top |
|
 |
bduncan |
Posted: Wed Dec 11, 2002 11:12 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Perhaps you could just post what your doubt is, and I'm sure someone can help you (there are probably a few hundred users here who have written C applications for MQSeries)  _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
mqwf |
Posted: Fri Dec 13, 2002 8:23 pm Post subject: Problem IN MQAI AND MQI calls |
|
|
 Acolyte
Joined: 10 Oct 2002 Posts: 62
|
There are two projects in C
One use mqic32.lib (i.e the client lib)..call it A
and another one uses the mqm.lib(i.e. Server lib)... call it B
We are thinking of joining the two projects
When we do that and in the project if we add mqm.lib then calls in the project A doesnt work. Basically for the inquire Qmgr, it gives me "qmgr name error" cause in the Qmgr name i am passing "*" asterisk. And if we use "*" in the Qmgr name then i have to use mqic32.lib to link(the MQClient Library) but i am using mqm.lib cause for my project B i need mqm.lib. But if I explicitly give the Qmgr name then MQCONNX call goes smoothly instead of using mqm.lib
If the use mqic32.lib then the project B doesnt work properly. If I use both the libraries and try to link I face the same problem.......still i get problem in inquiring the Qmgr
Note:- I have to use "*" while inquiring a Qmgr |
|
Back to top |
|
 |
clindsey |
Posted: Sat Dec 14, 2002 7:11 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
It is possible to have both libraries loaded simultaneouly but
you will need to load them dynamically with LoadLibrary and then access the api functions with GetProcAddress.
Go to the repository on this site and download ntloadmq.c.
This will give you the code to load mqic32.lib. You can rename the functions to cliconn, cliopen, etc and then
duplicate this code to load mqm.lib and create svrconn, svropen, etc. Then you can call the client or server api as needed.
Hope this helps,
Charlie |
|
Back to top |
|
 |
mqwf |
Posted: Thu Dec 26, 2002 9:51 pm Post subject: lib problem |
|
|
 Acolyte
Joined: 10 Oct 2002 Posts: 62
|
I went thru the ntloadmq.c code and tried to implement in my code but somehow it is not happening.
Actually for other calls i need mqm.lib......but only for inquire Qmgr i need mqic32.lib.
So initailly in the Project Settings i have set mqm.lib(i am using VC++)
Now for the inquire Qmgr calls i expliclity mention to LoadLibrary("MQIC32") and then free that
but it gives error as MQRC_Q_MGR_Name even though the qmgr is there...since it gets instance of both the library.
Can u suggest where i am going wrong
and how to do this in unix or aix
Or is there any other way to solve the above problem |
|
Back to top |
|
 |
clindsey |
Posted: Fri Dec 27, 2002 7:15 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
I think it would be easier to implement your project without using mqic32.
If you are doing "inquire queue manager", why can you not use MQINQ from mqm.lib? Can you give some specific reasons for needing mqic32.
Charlie |
|
Back to top |
|
 |
|