ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Programming of MQseries in C and C++

Post new topic  Reply to topic
 Programming of MQseries in C and C++ « View previous topic :: View next topic » 
Author Message
mqwf
PostPosted: Tue Dec 10, 2002 10:06 pm    Post subject: Programming of MQseries in C and C++ Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Wed Dec 11, 2002 11:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
mqwf
PostPosted: Fri Dec 13, 2002 8:23 pm    Post subject: Problem IN MQAI AND MQI calls Reply with quote

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
View user's profile Send private message
clindsey
PostPosted: Sat Dec 14, 2002 7:11 am    Post subject: Reply with quote

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
View user's profile Send private message
mqwf
PostPosted: Thu Dec 26, 2002 9:51 pm    Post subject: lib problem Reply with quote

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
View user's profile Send private message
clindsey
PostPosted: Fri Dec 27, 2002 7:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Programming of MQseries in C and C++
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.