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 » Mixed type messages and C++ API

Post new topic  Reply to topic
 Mixed type messages and C++ API « View previous topic :: View next topic » 
Author Message
Deley
PostPosted: Sun Apr 28, 2002 5:34 pm    Post subject: Reply with quote

Newbie

Joined: 27 Apr 2002
Posts: 1
Location: Brazil

Hi, my messages are defined something like this:
struct MY_MSG{
int ID;
char description[256];
float value;
}
I'm trying to pass a variable of type MY_MSG as the message. I've been studing the C++ API and the sample codes and I haven't found yet a way to pass a struct as the message.
How can I do that?

I think another way to realize that is to subclass the ImqItem, but I have no idea how to do that. If so, could we send me an example?

Thanks in advance.
Back to top
View user's profile Send private message Yahoo Messenger
kolban
PostPosted: Sun Apr 28, 2002 7:15 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

It would look like you use the write() method of the ImbMessage object passing in the pointer to the start of the storage for the structure in memory plus its size in bytes. This will create a message containing a copy of the structure which can then be put to the queue.
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 » Mixed type messages and C++ API
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.