ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » User Exits » DLL is not a valid windows image

Post new topic  Reply to topic
 DLL is not a valid windows image « View previous topic :: View next topic » 
Author Message
samsam007
PostPosted: Mon Nov 24, 2008 7:28 pm    Post subject: DLL is not a valid windows image Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

Dear MQ Programming Gurus,

I have compiled the following Exit program and installed in the Exit directory; setup svrconn channel to include this Exit, but got an error message saying "The application DLL c:\MqExits\fexit.dll is not a valid windows image..."
I compiled this simple c program with "cl fexit.c -o fexit.dll -LD -DEFAULTLIB mqm.lib mqmvx.lib"

Here is the source code of the dll file


Your help is much appreciated.

Thanks
Back to top
View user's profile Send private message
samsam007
PostPosted: Mon Nov 24, 2008 7:31 pm    Post subject: Re: DLL is not a valid windows image Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

samsam007 wrote:
Dear MQ Programming Gurus,

I have compiled the following Exit program and installed in the Exit directory; setup svrconn channel to include this Exit, but got an error message saying "The application DLL c:\MqExits\fexit.dll is not a valid windows image..."
I compiled this simple c program with "cl fexit.c -o fexit.dll -LD -DEFAULTLIB mqm.lib mqmvx.lib"

Here is the source code of the dll file


Your help is much appreciated.

Thanks


Sorry, I was struggling to repost this with the source code, but the website returned wtih message "the service is tempoary unavailable..."
Now I can only post the message with out source code.
How can I post the source code?

Thanks
Back to top
View user's profile Send private message
samsam007
PostPosted: Mon Nov 24, 2008 7:33 pm    Post subject: Re: DLL is not a valid windows image Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

samsam007 wrote:
Dear MQ Programming Gurus,

I have compiled the following Exit program and installed in the Exit directory; setup svrconn channel to include this Exit, but got an error message saying "The application DLL c:\MqExits\fexit.dll is not a valid windows image..."
I compiled this simple c program with "cl fexit.c -o fexit.dll -LD -DEFAULTLIB mqm.lib mqmvx.lib"

Here is the source code of the dll file


Your help is much appreciated.

Thanks


This is the source I got the error message popup from.
http://www.mqseries.net/phpBB2/viewtopic.php?t=20523
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 24, 2008 7:57 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Did you read and the user exit documentation?
Did you verify you used one of the authorized compilers?
Did you verify that your linkage table was passed correctly?
Did you build the exit in 32 and 64 bits?

Finally what is the error with error number that you are getting?


Hope this helps someone with more programming experience to help you.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Tue Nov 25, 2008 3:46 pm    Post subject: Re: DLL is not a valid windows image Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2495
Location: Melbourne, Australia

samsam007 wrote:
Dear MQ Programming Gurus,

I have compiled the following Exit program and installed in the Exit directory; setup svrconn channel to include this Exit, but got an error message saying "The application DLL c:\MqExits\fexit.dll is not a valid windows image..."
I compiled this simple c program with "cl fexit.c -o fexit.dll -LD -DEFAULTLIB mqm.lib mqmvx.lib"


Your cl command will produce an intermediate object file (.obj), not a Dynamic Link Library file.

I prefer the 2 step compile + link approach:
cl /c /MD fexit.c
link /DLL /out:fexit.dll fexit.obj mqm.lib mqmvx.lib
_________________
Glenn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » User Exits » DLL is not a valid windows image
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.