No replies
5 Posts

Pinned topic IBM MQ issue with 32-bit operating system(not able to connect)

‏2013-04-24T01:31:35Z |


There is an issue i am facing with 32-bit windows OS when connected with IBM MQ 7.1 client.
I am using amqmdnet.dll (referenced from IBM\websphere\bin folder)
    <Reference Include="amqmdnet, Version=, Culture=neutral, PublicKeyToken=da2dc1d9abf9ed97, processorArchitecture=MSIL">
 and building my .net app using MQ.NET classes, however after deployment, if the target machine has MQ client installed, the app throws 
> System.DllNotFoundException: Unable to load DLL 'C:\Program
> Files\IBM\WebSphere MQ\bin\mqz.dll': The specified module could not be
> found. (Exception from HRESULT: 0x8007007E)
      at NativeUnmanagedType.zstSPI(Int32 hConn, Int32 verbId, Int32 hObj, Byte[] pInOut, Byte[] pIn, Byte[] pOut, Int32& compCode, Int32& reason)
       at IBM.WMQ.Nmqi.UnmanagedNmqiMQ.SPIQuerySPI(Hconn hConn, Int32 verbId, Int32& maxInOutVersion, Int32& maxInVersion, Int32& maxOutVersion, Int32& flags, Int32& pCompCode, Int32& pReason)
       at IBM.WMQ.Nmqi.UnmanagedNmqiMQ.MQCONNX(String pQMgrName, MQCNO& pConnectOpts, Hconn parentHconn, Phconn phconn, Int32& pCompCode, Int32& pReason)
       at IBM.WMQ.Nmqi.UnmanagedNmqiMQ.MQCONNX(String pQMgrName, MQConnectOptions pConnectOpts, Phconn phconn, Int32& pCompCode, Int32& pReason)
       at IBM.WMQ.MQQueueManager.Connect(String queueManagerName)
       at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties)
 My code is 
                // mq properties
                properties = new Hashtable();
                properties.Add(MQC.CONNECTION_NAME_PROPERTY, "Connection Name");
                properties.Add(MQC.TRANSPORT_PROPERTY, "Transport Type");
                properties.Add(MQC.CHANNEL_PROPERTY, "Channel Name"); 
//To read the messages
    mqGetMsgOpts = new MQGetMessageOptions();
    if (mqQueue != null)
                    //Get options for the messsage                
                    mqGetMsgOpts.Options = MQC.MQGMO_BROWSE_FIRST | MQC.MQGMO_WAIT |  MQC.MQOO_INQUIRE;
                    mqGetMsgOpts.MatchOptions = MQC.MQMO_NONE;
                    mqGetMsgOpts.WaitInterval = 5000;  // 5 seconds limit for waiting
          if (mqMsg.MessageLength > 0 && mqMsg.DataLength > 0)
            messageData = mqMsg.ReadString(mqMsg.MessageLength);
There is browse_next after queue manager commit is called(so browse the next messsage).
//To put the message
> if(mqQueue==null)   
mqQueue = mqQMgr.AccessQueue("Queue Name",
>    mqMsg.WriteString(message);
How do i resolve that error, any idea? The same piece of code works fine windows 64-bit OS. I don't have that mqz.dll inside bin folder in 64-bit OS's websphere MQ client installation folder, there it works, however it fails iin 32-bit OS.
Updated on 2014-02-19T13:06:10Z at 2014-02-19T13:06:10Z by Morag Hughson