PayPal is the easiest way to receive money online. Get one now or Click here to sign up. Sign up for PayPal and start accepting credit card payments instantly.

How to receive message in MSMQ using perl

use strict;
use Win32::OLE;
getInbox('MSMQ-Server\private$\Test');
sub getInbox()
{
my $Queue = shift;
my $message;
my $getInboxMsg = Win32::OLE->new('MSMQ.MSMQMessage');
my $getInboxInfo = Win32::OLE->new('MSMQ.MSMQQueueInfo');
$getInboxInfo->{FormatName}= "direct=os:" . $Queue;
my $getInboxQue= $getInboxInfo->Open(1,0) or return $_;
if (defined($getInboxQue))
{
$message = $getInboxQue->Receive();
$getInboxQue->Close;
}
return $message->{Body};;
}

No comments:

WebProNews Feed

eWeek - RSS Feeds

HowtoForge - Howtos and Tutorials

The Register

PayPal is the easiest way to receive money online. Get one now or Click here to sign up. Sign up for PayPal and start accepting credit card payments instantly.