in reply to Re: Re: Re: Re: Re: CGI to MSMQ
in thread CGI to MSMQ

Hmm. No System.Messagging.MessageQueue under HKEY_CLASSES_ROOT, but I have had some limited success.

use Win32::OLE; my $queueInfo = Win32::OLE->new('MSMQ.MSMQQueueInfo'); $queueInfo->{pathname} = '.\private$\foo'; $queueInfo->Create();
The preceeding code does actually create the queue, so I know that this set of objects exists and functions. Still, I can't send a message! As I mentioned elsewhere, perhaps the problem is that the queue object I receive from calling $queueInfo->Open(2,0) is unblessed?

Continuing thanks,
A.M.

Replies are listed 'Best First'.
Re(7): CGI to MSMQ
by gellyfish (Monsignor) on Jun 17, 2003 at 13:53 UTC

    That's right. System.Messagging.MessageQueue is the name of the .NET Framework class that abstracts the MSMQ API. As you have correctly surmised the ProgId of the object you want is MSMQ.MSMQQueueInfo. You probably want to print out the value of Win32::OLE::LastError() (and possibly $^E) to see why the Open() is failing.

    /J\
    
      print Win32::OLE::LastError();
      Win32::OLE(0.1603) error 0x80020005: "Type mismatch" in METHOD/PROPERTYGET "Open" argument 1
      $^E gives nothing...