Operating System - HP-UX
1752587 Members
4061 Online
108788 Solutions
New Discussion

Sharing Data using Message Queues between 32 Bit and 64 Bit

 
Maverick_2
Occasional Advisor

Sharing Data using Message Queues between 32 Bit and 64 Bit

Hi

We are passing data using message queues between 32 Bit and 64 Bit Apps..

Our functions looks like this in 64 Bit
SendMsg(void * SendBuffer , long len , struc handle )
{
msgsnd(handle->msqid , sendBuffer , len , IPC_NOWAIT);
}

In 32 Bit it is recived as
RecMsg(void * RecvBuffer , long len , struc handle )
{
msgrcv(handle->msqid, RecvBuffer , len , ANY_MSG,MSG_NOERROR);
}

The messages are truncated when they are received in the 32 Bit app. Interestingly only the first 4 chars are truncated.
The Message sizes are pretty small < 500 bytes..

Is it mandatory to use user defined structures
like msgbuf(long type ; string message);

Any Help would be appreciated

Thanks in Advance..
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: Sharing Data using Message Queues between 32 Bit and 64 Bit

I saw a question like this a few days ago, with amost the same subject.

If you recompile your application on this platform, wheter its a 32 bit app or a 64 bit app, data will be shareable in the message queue and other shared memory areas.

You may get code change recommendations from coders, I'm not sure about that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com