Problem in QNX Mommentic .

Hello All QNX members,

I’ve new problem when using QNX Mommentic Windows host. I create Client and Server program. Then I run both program on console under QNX Mommentic with my real target machine. The output of the both programs exactly what I expected.
However when I run Server program on target machine and Client program on console, the Server program does’nt give same output before. When I run step by step debug on client program that send the msg to server that in receive block state running on the target machine,seem that the server side receive the msg but can’t reconise it.
Then I try to step by step debug for both program in QNX Mommentic’s debug perspective, ironicly the Server program can reconise msg and also pulsecode send by client program.
Below some codes in Server and Client program.
Can you all give a comment on this?

ON THE CLIENT SIDE CODES:

[b]struct MSG_HEADER {
struct _pulse pulse;
unsigned short MsgId;

};
main()
{
MSG_HEADER msg;

msg.MsgId = MSG_STATUS_RESPONSE;
printf(“MSG:3rd MsgSend to Server(MSG_STATUS_RESPONSE)\n”);
if (MsgSend( server_coid, &msg, sizeof( msg ), &sRqstResp, sizeof(sRqstResp) ))
{
perror(PROGNAME “MsgSend”);
exit( EXIT_FAILURE );
}

}[/b]

ON THE SERVER SIDE CODES:

typedef unsigned char BYTE;

[b]main(){
[b]static BYTE lpRecvdMsg[2048];
E_LANT_MSG_TYPES eMsgType;
int8_t ePulseCode;


rcvid = MsgReceive( att->chid, &lpRecvdMsg, sizeof (lpRecvdMsg), NULL );

if(rcvid==0)
{
ePulseCode = *(int8_t )&lpRecvdMsg[(2sizeof(int16_t))];
switch( ePulseCode )
{


}
}

if(rcvid>0){
eMsgType = *(E_LANT_MSG_TYPES *)&lpRecvdMsg[sizeof(_pulse)];

switch(eMsgType){

case MSG_STATUS_RESPONSE:


break;


}
}

…[/b]}