Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MSMQ: Problem with qInfo->PathName setting

MSMQ: Problem with qInfo->PathName setting

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelptutorial
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PankajB
    wrote on last edited by
    #1

    Hi There. My problem is: I am able to send messages to the queue using my machines name, but am unable to do the same with IP Add. For example: qInfo->PathName = "MYCOMPUTER\\private$\\PanBQueue"; works fine... qInfo->PathName = "IP ADDRESS\\private$\\PanBQueue"; Fails... Thanks PanB

    A 1 Reply Last reply
    0
    • P PankajB

      Hi There. My problem is: I am able to send messages to the queue using my machines name, but am unable to do the same with IP Add. For example: qInfo->PathName = "MYCOMPUTER\\private$\\PanBQueue"; works fine... qInfo->PathName = "IP ADDRESS\\private$\\PanBQueue"; Fails... Thanks PanB

      A Offline
      A Offline
      Adam Roderick J
      wrote on last edited by
      #2

      Did you check the error you are getting? Please check that first?

      Величие не Бога может быть недооценена.

      P 1 Reply Last reply
      0
      • A Adam Roderick J

        Did you check the error you are getting? Please check that first?

        Величие не Бога может быть недооценена.

        P Offline
        P Offline
        PankajB
        wrote on last edited by
        #3

        I do not get any error message as such. But when I try to open the queue...i.e., qDest = qInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); I got an exception. Please let me know, in case you need any further details. Thanks anyway for your effort.

        A 1 Reply Last reply
        0
        • P PankajB

          I do not get any error message as such. But when I try to open the queue...i.e., qDest = qInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); I got an exception. Please let me know, in case you need any further details. Thanks anyway for your effort.

          A Offline
          A Offline
          Adam Roderick J
          wrote on last edited by
          #4

          Please tell me whats the exception? And i hope u checked the getLastError [^]

          Величие не Бога может быть недооценена.

          P 1 Reply Last reply
          0
          • A Adam Roderick J

            Please tell me whats the exception? And i hope u checked the getLastError [^]

            Величие не Бога может быть недооценена.

            P Offline
            P Offline
            PankajB
            wrote on last edited by
            #5

            catch(_com_error &e) e.Source() -> MSMQQueueInfo e.Description() -> The queue path name specified is invalid.

            A 1 Reply Last reply
            0
            • P PankajB

              catch(_com_error &e) e.Source() -> MSMQQueueInfo e.Description() -> The queue path name specified is invalid.

              A Offline
              A Offline
              Adam Roderick J
              wrote on last edited by
              #6

              I think you are using MQPathNameToFormatName, if so then DNS name is correct. It wont accept IPAddress. So i think, firstly IP address should be changed to corresponding DNS name [^]

              Величие не Бога может быть недооценена.

              P 1 Reply Last reply
              0
              • A Adam Roderick J

                I think you are using MQPathNameToFormatName, if so then DNS name is correct. It wont accept IPAddress. So i think, firstly IP address should be changed to corresponding DNS name [^]

                Величие не Бога может быть недооценена.

                P Offline
                P Offline
                PankajB
                wrote on last edited by
                #7

                More info: I want to place a message from MachineA to MachineB's Message Queue. So, I have to access the message queue on MachineB using its IP Address itself. Any pointers/suggestions will be highly appretiated. Thanks.

                A 1 Reply Last reply
                0
                • P PankajB

                  More info: I want to place a message from MachineA to MachineB's Message Queue. So, I have to access the message queue on MachineB using its IP Address itself. Any pointers/suggestions will be highly appretiated. Thanks.

                  A Offline
                  A Offline
                  Adam Roderick J
                  wrote on last edited by
                  #8

                  As i suggested earlier, get the DNS name from IPadress using gethostbyaddr API [^] And then pass DNS name with the path. Now your problem solved,isn't it?

                  Величие не Бога может быть недооценена.

                  modified on Wednesday, December 23, 2009 11:43 PM

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups