Author |
Message
|
voodaravikumar |
Posted: Tue Mar 14, 2006 12:25 am Post subject: how to connect to a remote queue in c++ |
|
|
Newbie
Joined: 14 Mar 2006 Posts: 4
|
Hi,
please help me in guiding me to connect to a remote queue from my system. Iam working on c++ |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Mar 14, 2006 12:56 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
do some rtfm
have a look at the supplied samples
read what has been aksed and posted here _________________ Regards, Butcher |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 14, 2006 12:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Do you mean:
a) Connecting to a remote queue definition on the local machine you're using?
or
b) Connecting to a local queue on a machine remote to the one you're using?
Staying with the slightly pedantic terminology, you don't connect to a queue, you connect to a queue manager. In both of the above cases it will be the queue manager where the definition (local or remote) is held. You then open the queue, the method is identical no matter if it's local or remote, and do your thing!
There are a number of useful publications which can guide you. The "Application Programming Guide" and "Application Programming Reference" contain a lot of useful information, the "Using C++" manual I would say it crucial for you (!) and depending on if you're in scenario a) or b) the "Clients" manual might be useful.
All contain a wealth of information and laid out in a far clearer and informative way than I ever can. As a C/C++ coder myself I can personally recommend them!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
voodaravikumar |
Posted: Tue Mar 14, 2006 1:15 am Post subject: |
|
|
Newbie
Joined: 14 Mar 2006 Posts: 4
|
I need to access a local queue on the machine remote to the one I am using. I tried to connect to the default queue manager on the remote machine using the MQCONN call. But I am not able to connect to the Queue Manager on a different machine. Is there any other API for connecting to the queue manager on the remote machine. Or what is the way of addressing the queue manager on a remote machine. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 14, 2006 1:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Then you do need to create a client connection to that queue manager, as described in the Clients manual, and ensure your application is linked with the client code, as described in the other books. Once this has been achieved you should be away.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
voodaravikumar |
Posted: Tue Mar 14, 2006 1:25 am Post subject: |
|
|
Newbie
Joined: 14 Mar 2006 Posts: 4
|
can you send me a sample program to connect as client |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 14, 2006 1:40 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
voodaravikumar wrote: |
can you send me a sample program to connect as client |
See the sample that comes with an MQ installation: Tools\cplus\Samples\imqsput.cpp (this is the relative path within the installation directory on Windows MQ v6). |
|
Back to top |
|
 |
voodaravikumar |
Posted: Tue Mar 14, 2006 1:50 am Post subject: |
|
|
Newbie
Joined: 14 Mar 2006 Posts: 4
|
i tried the program you haves sent but it is giving me the error that it is unable to find the imqc23vn.dll although it exists in my system. I have even registered that dll |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 14, 2006 2:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
So resolve this as you would any other "Unable to find dll" error. It's nothing special, just a dll with code in it like any other. There's no magic with MQ.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 14, 2006 2:48 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
voodaravikumar wrote: |
I have even registered that dll |
Where / how did you register it? To the best of my knowledge this is just a "normal" Win32 DLL - ie. no COM and so on.
Ensure <MQ install dir>\bin is on your path, and try again. If problems persist, please post full error messages so we get to see precisely what's going on. |
|
Back to top |
|
 |
|