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 » MQMessage invalid with version 7 of cmqc.h

Post new topic  Reply to topic
 MQMessage invalid with version 7 of cmqc.h « View previous topic :: View next topic » 
Author Message
badger2196
PostPosted: Thu Sep 30, 2010 11:13 am    Post subject: MQMessage invalid with version 7 of cmqc.h Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 5

We have a C++ program that runs fine with version 6 of the cmqc.h header file. However, when using version 7 of this file, the MQMessage pointer returned by MQGET is invalid. cmqc.h is supposed to be backwards compatible - does anyone have any clues as to why the message would be invalid?

We are running MQSeries 6 on 64 bit Windows XP.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 30, 2010 11:23 am    Post subject: Re: MQMessage invalid with version 7 of cmqc.h Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

badger2196 wrote:
However, when using version 7 of this file, the MQMessage pointer returned by MQGET is invalid.


What other v7 files does this app use? Is it linked with the v7 libraries? I'd see that as more of a possible issue than the header file especially if you're using a client connection.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
badger2196
PostPosted: Thu Sep 30, 2010 11:33 am    Post subject: Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 5

It only links to mqm.dll which (supposedly) can be V6 or 7.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 30, 2010 11:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

badger2196 wrote:
It only links to mqm.dll which (supposedly) can be V6 or 7.


Can it? Where is the "supposedly" coming from? It's worth checking file sizes to see if the same version is shipped with both v6 & v7. Especially as, having re-read my previous post, there seems to have been a problem in the brain/finger typing interface. I know a v7 client can connect to a v6 queue manager, but didn't think you could establish cross version binding connections.

So the "not" I thought I'd typed would have been helpful. It's been a long day.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 30, 2010 11:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Okay, don't try and mix and match files between versions when doing compiles.

If you're trying to compile against V6, then use the full v6 set of libs and includes and .h files.

If you're trying to compile against v7, then use the full v7 set of libs and etcetcetc.

It's not otherwise terribly clear what you're really actually doing. .h files really aren't used at runtime... So are you having a compile issue or a runtime issue?
Back to top
View user's profile Send private message
badger2196
PostPosted: Fri Oct 01, 2010 8:44 am    Post subject: Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 5

I'm having the issue at runtime. It turns out the issue is also apparent if I use version 7.0 of the DLL with cmqc.h
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Oct 01, 2010 9:09 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I do not understand what you mean by using the cmqc.h file at runtime.

I do not understand what you mean by using a DLL with cmqc.h file.

CMQC.h is a header file. It is used at compile time to assist in turning source code into object code, and potentially used during link time to link object code into an executable.

Also, MQ is "forward" compatible, it is not "backwards" compatible. What this means is that it you are allowed to use code that is compiled against an older version of the product without change against a newer version of the product. So if you build your application against MQ v6, it will run against MQ v7. But it is not guaranteed that if you build your application against MQ v7 that it will then run against MQ v6!

If you are specifically experiencing an issue where you have compiled and linked your application against the MQ v6 product, and are getting errors when running it against an MQ v7 install, then you can probably open a PMR.

How, specifically are you using the v7 version of cmqc.h? As I said, you should not be mixing and matching. If you have taken a copy of cmqc.h from a v7 install and put it on a machine with v6, then that won't work.
Back to top
View user's profile Send private message
badger2196
PostPosted: Mon Oct 04, 2010 10:46 am    Post subject: Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 5

Yes, I know what a header file is. What I am trying to convey here is that I can compile my app using V6 of the cmqc.h file and it reads MQ messages just fine. If I compile it using V7 of the header however, I can no longer read MQ messages (and this is true in a V6 or V7 MQ environment).
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 04, 2010 10:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

badger2196 wrote:
If I compile it using V7 of the header however, I can no longer read MQ messages (and this is true in a V6 or V7 MQ environment).


Some simple and important questions need to be answered:

1) What version of mqm.dll are you linking against?
2) Are you certain you're using a binding connection?
3) Why would you expect an application compiled with v7 anything to work against a v6 queue manager?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 04, 2010 10:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Are you using a full MQ v7 install to build against?

Or are you copying files from a full MQ v7 install onto a build machine?

Are you then running the program against an MQ v7 install? Or an MQ v6 install?
Back to top
View user's profile Send private message
badger2196
PostPosted: Mon Nov 01, 2010 10:33 am    Post subject: Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 5

I have a full MQ V7 system (including mqm.dll) that I am compiling against, but if I compile using the V7 version of cmqc.h I cannot process messages using MQGET. If, strangely enough, I revert back to the V6 version of that header file and re-compile. it all works just fine.

I am running my program against an MQ V7 system.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 01, 2010 10:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What is the MQ Reason and Completion Code you receive from your MQGET when compiled against the full v7 library?
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 » MQMessage invalid with version 7 of cmqc.h
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.