1 Reply Latest reply on Jul 5, 2006 10:00 AM by Mark Jeffery

    MSMQ Private message queue creation

      client has need for environment rollout to be able to create a private message queue, this is not accessible via the windows metabase, the MSMQ application module can be rolled out but creating a private message queue has not been possible.

       

      The below code from : http://www.mail-archive.com/vbcomponents@p2p.wrox.com/msg01077.html//www.mail-archive.com/vbcomponents@p2p.wrox.com/msg01077.html

       

      I'd like to get the example code compiled into an .exe with command line arguments for SERVERNAME , QNAME and QLABEL :

       

      could somebody point me in the direction of this, I've downloaded MS Express Studio/Vbasic and tried to compile a console .exe file however an installable is created, any directions would be gratefully received

       

      'Enter your sever name here

      '

      SERVERNAME= "HAL"

       

      CONST MQ_SEND_ACCESS = 2

      CONST MQ_DENY_NONE = 0

       

      Main(){

       

      On error resume next

      CreateQ "TestClient_1","TestClient_1 queue"

       

      }

       

       

      Sub CreateQ(Qname,QLabel)

      Dim qInfo

      set qInfo = CreateObject("MSMQ.MSMQQueueInfo")

      if Err = 0 then

      qInfo.PathName = SERVERNAME & "\" & Qname

      qinfo.Label = QLabel

      qInfo.Create

      End if

      Set qInfo = Nothing

      End Sub