1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Message Queue problem

Discussion in 'PHP' started by vandegerrit, Sep 13, 2005.

  1. #1
    When i send a message to the message queue with the following example (From php.net)

    define(MQ_SEND_ACCESS , 2);
    define(MQ_DENY_NONE , 0);

    $msgQueueInfo = new COM("MSMQ.MSMQQueueInfo") or die("can not create MSMQ Info object");
    $msgQueueInfo->PathName = "c184\private$\Navisionrequest";

    $msgQueue = new COM("MSMQ.MSMQQueue") or die("can not create MSMQ object");
    $msgQueue=$msgQueueInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE );

    $msgOut = new COM("MSMQ.MSMQMessage") or die("can not create MSMQ message object");
    $msgOut->Body = "Hello world!";
    $msgOut->Send($msgQueue);

    $msgQueue->Close();
    unset($msgOut);
    unset($msgQueue);
    unset($msgQueueInfo);

    I receive the message in the queue like this:
    48 00 65 00 6C 00 6C 00 6F H.e.l.l.o
    00 20 00 77 00 6F 00 72 00 . .w.o.r.
    6C 00 64 00 21 00 l.d.!.

    Is the encoding the problem or something else??

    Can someone help me????
     
    vandegerrit, Sep 13, 2005 IP