Click to See Complete Forum and Search --> : MQ exception ??


MirekL
February 13th, 2002, 04:13 AM
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

cpitis
February 13th, 2002, 07:34 AM
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.