CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MQ exception ??

  1. #1
    Join Date
    Feb 2002
    Location
    Czech - Prague
    Posts
    39

    MQ exception ??


    import "mqoa.dll;
    using namespace MSMQ;

    try {
    IMSMQQueueInfoPtr pqinfo ("MSMQ.MSMQQueueInfo"); ////////////// THIS THROWS EXCEPTION
    pqinfo->PathName = L".\\queuename";
    //
    // Create non-transactional, non-world-readable queue.
    //
    pqinfo->Create();
    }
    catch (_com_error &e) {
    // UNDONE: handle error.
    }




    why the exception is throwed ?? - its part of MS sample .. i am using W2k Server .. nad VC++ 6.0

    Thaks for all suggestions
    Mira


  2. #2
    Join Date
    Feb 2002
    Posts
    81

    Re: MQ exception ??

    Check if you called CoInitialize when the application starts and CoUnitialize when the application stops. These calls are mandatory for the COM clients to run successfuly.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured