Topic
No replies
sharpeye500
sharpeye500
5 Posts
ACCEPTED ANSWER

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 7.1.0.0 amqmdnet.dll (referenced from IBM\websphere\bin folder)
 
 
    <Reference Include="amqmdnet, Version=7.1.0.0, Culture=neutral, PublicKeyToken=da2dc1d9abf9ed97, processorArchitecture=MSIL">
          <SpecificVersion>False</SpecificVersion>
          <HintPath>..IBM\WebSphereMQ\7.1.0.0\amqmdnet.dll</HintPath>
    </Reference>
 
 
 and building my .net app using MQ.NET classes, however after deployment, if the target machine has 7.1.0.0 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"); 
                properties.Add(MQC.CONNECT_OPTIONS_PROPERTY, MQC.MQCNO_HANDLE_SHARE_BLOCK);
 
//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",
> MQC.MQOO_OUTPUT | MQC.MQOO_INPUT_SHARED | MQC.MQOO_INQUIRE);
>    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