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. Help me With My code

Help me With My code

Scheduled Pinned Locked Moved C / C++ / MFC
helpdata-structuresquestion
4 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.
  • A Offline
    A Offline
    ALQallaf
    wrote on last edited by
    #1

    I wrote this code to send msg to MSMQ , but it did not work can any one give me any idea to fix it,if there is something wrong ? this is my queue -> gateway\private$\newqueue -------------------------------- #include "stdafx.h" #include <stdio.h> #include <atlbase.h> #include <iostream> #import <mqoa.dll> using namespace MSMQ; using namespace std; void Send(); int main(int argc, char* argv[]) { Send(); return 0; } void Send() { IMSMQQueueInfoPtr spQInfo("MSMQ.MSMQQueueInfo"); spQInfo->PutPathName(SysAllocString(OLESTR(".\\newqueue"))); IMSMQQueuePtr spQSend = spQInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); IMSMQMessagePtr spQMsg("MSMQ.MSMQMessage"); spQMsg->Label = "This is a Word Document2"; spQMsg->Body = "My Boudy"; spQMsg->Send(spQSend); spQSend->Close(); } -- modified at 18:41 Wednesday 19th April, 2006

    D 1 Reply Last reply
    0
    • A ALQallaf

      I wrote this code to send msg to MSMQ , but it did not work can any one give me any idea to fix it,if there is something wrong ? this is my queue -> gateway\private$\newqueue -------------------------------- #include "stdafx.h" #include <stdio.h> #include <atlbase.h> #include <iostream> #import <mqoa.dll> using namespace MSMQ; using namespace std; void Send(); int main(int argc, char* argv[]) { Send(); return 0; } void Send() { IMSMQQueueInfoPtr spQInfo("MSMQ.MSMQQueueInfo"); spQInfo->PutPathName(SysAllocString(OLESTR(".\\newqueue"))); IMSMQQueuePtr spQSend = spQInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); IMSMQMessagePtr spQMsg("MSMQ.MSMQMessage"); spQMsg->Label = "This is a Word Document2"; spQMsg->Body = "My Boudy"; spQMsg->Send(spQSend); spQSend->Close(); } -- modified at 18:41 Wednesday 19th April, 2006

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      ALQallaf wrote:

      ...but it did not work

      Which means nothing if you don't tell us which part did not work. Your code has no error checking. What does the Send() method return?


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      A 2 Replies Last reply
      0
      • D David Crow

        ALQallaf wrote:

        ...but it did not work

        Which means nothing if you don't tell us which part did not work. Your code has no error checking. What does the Send() method return?


        "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

        "There is no death, only a change of worlds." - Native American Proverb

        A Offline
        A Offline
        ALQallaf
        wrote on last edited by
        #3

        thank you, it give me an error when i try to run it thats all (Debug Error! abnormal program termination) , i have project i have to make it :~

        1 Reply Last reply
        0
        • D David Crow

          ALQallaf wrote:

          ...but it did not work

          Which means nothing if you don't tell us which part did not work. Your code has no error checking. What does the Send() method return?


          "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

          "There is no death, only a change of worlds." - Native American Proverb

          A Offline
          A Offline
          ALQallaf
          wrote on last edited by
          #4

          Thank you it has been fixed :laugh: the only things that i have trust on my self ;P , the problem it was from some parametar thanks you DavidCrow

          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