|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Using MQ API calls in VB.NET |
« View previous topic :: View next topic » |
Author |
Message
|
MillsPerry |
Posted: Wed Jun 18, 2003 9:39 am Post subject: Using MQ API calls in VB.NET |
|
|
 Acolyte
Joined: 08 Oct 2001 Posts: 59 Location: ZyQuest, inc.
|
I am trying to write a VB.NET class that uses the MQ API. I took some code that works in VB6, did all the obvious conversions like changing Longs to Int32, but it does not work in VB.NET.
For example, I try a MQCONN call using the attached code sample, but all I get is a reason code of 2058 (MQRC_Q_MGR_NAME_ERROR). Since I am obviously communicating with MQSeries, I suppose that the API does not like the string format of the QMgr name. Can anybody tell me what I am doing wrong?
Code: |
Module Module1
Private Declare Auto Sub MQCONN _
Lib "C:\Program Files\MQSeries Client\bin\MQIC32.DLL" _
Alias "MQCONNstd@16" (ByRef QMgrName As String, ByRef Hconn As Int32, _
ByRef CompCode As Int32, ByRef Reason As Int32)
Sub Main()
Dim intCompCode, intRC, intHandle As Int32
MQCONN("MyQMgrName", intHandle, intCompCode, intRC)
End Sub
End Module |
PS. To head off the obvious replys; Yes, I know about IBM's DotNet service pack. No, I am not interested in using it, nor am I interested in COM interop. I just want to know how to use the old API.
Thanks! |
|
Back to top |
|
 |
MillsPerry |
Posted: Thu Aug 07, 2003 7:07 am Post subject: |
|
|
 Acolyte
Joined: 08 Oct 2001 Posts: 59 Location: ZyQuest, inc.
|
Solved the problem by running a working VB6 program through the upgrade wizard. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|