|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSeries 'C' Programming |
« View previous topic :: View next topic » |
Author |
Message
|
rookie_rookie |
Posted: Mon May 30, 2005 8:25 pm Post subject: MQSeries 'C' Programming |
|
|
Newbie
Joined: 30 May 2005 Posts: 1
|
I'm trying to implement generix functions for Queue manager connection and other functions...
I gave prototype as void CMQCONNX (MQCHAR48, MQCNO *, MQHCONN *, MQLONG *, MQLONG *);
I called the function in main as CMQCONNX (QMName,&Connect_options,&Hcon,&CompCode,&CReason)
Within the used defined function I have to call the function to create connection..I called the following function statement
MQCONNX (QMName,&Connect_options,&Hcon,&CompCode,&CReason);
I got Error as
1. C:\Dev-Cpp\Programs\New Folder\Pointer Trigger Monitor\triggermonitor.c cannot convert `MQCNO**' to `MQCNO*' for argument `2' to `void MQCONNX (MQCHAR*, MQCNO*, MQHCONN*, MQLONG*, MQLONG*)'
Please look at error and suggest...I'm also trying... |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon May 30, 2005 11:02 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Quote: |
cannot convert `MQCNO**' to `MQCNO*' for argument `2' |
That's pretty self explanitory, MQCNO** is a double pointer and MQCNO* is a single pointer.
This is not a MQ error but standard C coding error. Just review pointers in C programming, any good text should have a chapter on this subject.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
Nigelg |
Posted: Tue May 31, 2005 11:16 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Connect_options is already a pointer passed into CMQCONNX, so you do not need to pass its address to MQCONNX. The same thing applies to Hcon, CompCode and CReason. The correct call in your code is
Code: |
MQCONNX (QMName,Connect_options,Hcon,CompCode,CReason);
|
[/code] |
|
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
|
|
|
|