|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Exit Complie Question |
« View previous topic :: View next topic » |
Author |
Message
|
JBrown |
Posted: Wed May 09, 2007 11:38 am Post subject: Exit Complie Question |
|
|
Newbie
Joined: 14 Feb 2007 Posts: 6
|
There is something wrong with the way I'm either compiling or linking a Channel Exit. I'm running MQ v6.0.2 on Windows 2000 and using cl.exe v14.00.50727.762 (version that comes with Visual C++ 2005 Express Edition) to compile. I compile a channel exit that does nothing with no errors. Copy the resulting dll to C:\Program Files\IBM\WebSphere MQ\exits. Setup the exit on a Server-connection channel. Connect with a client and then I get an error in the MQ logs.
The only things I found on Google and here where that the exit needs to be compiled with the MQ 64bit libraries for MQ v6. But since I'm not linking to any libraries since my exit does nothing Im at a loss. I tried looking for a switch with cl.exe to force a 64bit compile (like -m64 with gcc) but I couldn't find one. I'm not sure that would be appropriate anyway since Windows 2000 isn't 64bit capable.
exit.c:
Code: |
#include <cmqc.h>
#include <cmqxc.h>
void MQStart() {;}
void MQENTRY ChannelExit ( PMQCXP pChannelExitParms,
PMQCD pChannelDefinition,
PMQLONG pDataLength,
PMQLONG pAgentBufferLength,
PMQVOID pAgentBuffer,
PMQLONG pExitBufferLength,
PMQPTR pExitBufferAddr)
{
return;
} |
exit.def:
Code: |
LIBRARY exit
HEAPSIZE 4096
STACKSIZE 8192
EXPORTS ChannelExit |
Compile:
Code: |
cl /MD /LD /I. exit.c exit.def |
Channel Exit:
Code: |
C:\Program Files\IBM\WebSphere MQ\exits\exit(ChannelExit) |
AMQERR01.LOG:
Quote: |
...
----- amqrmrsa.c : 468 --------------------------------------------------------
5/9/2007 13:17:19 - Process(1996.50) User(mqmadmin) Program(amqrmppa.exe)
AMQ6175: The system could not dynamically load the library C:\Program
Files\IBM\WebSphere MQ\exit.dll. The system return code was 536895861. The
queue manager will continue without this module.
EXPLANATION:
This message applies to Windows NT and Windows 2000 systems only. The
dynamically loadable file C:\Program Files\IBM\WebSphere MQ\exit.dll failed to
load correctly due to an internal error. The MQ error recording routine has
been called.
ACTION:
Check that the file has not been corrupted then use the standard facilities
supplied with your system to record the problem identifier, and to save the
generated output files. Contact your IBM support center. Do not discard these
files until the problem has been resolved.
----- amqxufnn.c : 596 --------------------------------------------------------
5/9/2007 13:17:19 - Process(1996.50) User(mqmadmin) Program(amqrmppa.exe)
AMQ9535: User exit not valid.
EXPLANATION:
Channel program 'CLIENT.TO.HERE' ended because user exit 'C:\Program
Files\IBM\WebSphere MQ\exit(ChannelExit)' is not valid.
ACTION:
Ensure that the user exit is specified correctly in the channel definition, and
that the user exit program is correct and available.
----- amqrexta.c : 5295 -------------------------------------------------------
5/9/2007 13:17:19 - Process(1996.50) User(mqmadmin) Program(amqrmppa.exe)
AMQ9999: Channel program ended abnormally.
EXPLANATION:
Channel program 'CLIENT.TO.HERE' ended abnormally.
ACTION:
Look at previous error messages for channel program 'CLIENT.TO.HERE' in the
error files to determine the cause of the failure.
----- amqrmrsa.c : 468 --------------------------------------------------------
... |
Last edited by JBrown on Wed May 09, 2007 12:19 pm; edited 2 times in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 09, 2007 11:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't worry about 64 bit on Windows, unless you *know* you're running on 64 bit hardware.
Channel Exits need to be used in pairs - one on each side.
Otherwise, you're probably still not building your exit correctly. I haven't ever needed to do it myself, so I can't help much more.
Dig around for RogerLaCroix's rant on the subject. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JBrown |
Posted: Wed May 09, 2007 12:20 pm Post subject: |
|
|
Newbie
Joined: 14 Feb 2007 Posts: 6
|
Okay, I feel dumb now. I took off the /MD flag and it works perfect now. |
|
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
|
|
|
|