How to: 32-bit DLL running in 64-bit Windows 2008 Server

I have a 32-bit DLL that ran fine in Windows 2003 Server 64-bit.  Now I am forced to move up to Windows 2008 Server 64-bit, and I am finding that the DLL will not load.  The author told me that he believes it would not work in 64-bit OSs.

Options:
1) Get the author to recompile for 64-bit compatibility.  It is C++ code.  Should that be as easy as selecting a different build option?
2) For shorter term or if 1) does not work, can I successfully set the application pool to enable 32-bit applications?  An article online said that allows 32-bit DLLs to run. However, when I did make the suggested change to enable 32-bit code via IIS 7 Manager (Advanced Settings for the specific Application Pool), then the Web site itself would no longer run.  Are there other settings changes needed?  Another approach needed?

Thanks.
LVL 1
DavidInsight and Energy SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sindhuxyzCommented:
Hi,

You can run IIS 7 as 32 bit. It looks you have used DLL as ISAPI? If yes then you can add preCondition="bitness32" in Web.Config(define in handler)
0
DavidInsight and Energy SpecialistAuthor Commented:
Thank you, sindhuxyz.  But, can you provide more detail?  How to run IIS 7 as 32 bit.  And then you have the second part, about ISAPI and bitness etc.  Is that a second, alternative approach?

The DLL is called from ColdFusion 9, and I am not sure if it is ISAPI.  Where is the Web.Config...

Anyway, it seems more detail is needed for the answer (I can also research some of this, but have to go to a class in a few minutes).
0
sindhuxyzCommented:
This need a lot of technical detail to do it. Windows server 2008 is bit different then WIndows Serevr 2003. I can give you hint, use Google for more info:

1) Search how to use a DLL in Windows Server 2008(Adding Hanlder)?
2) When you successfully Add handler, it will create  code in web.config with preCondition="bitness64", change it to preCondition="bitness32"


0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

khairilCommented:
Hi,

If it is possible try get the developer to compile it into 64bit then get him recompile it. Unless he his using specifically 32bit library, compilation usual not give to much problem.  It will boost performance as your app do not have to be emulate or go thru 32it subsystem.

In order to run in 32 bit mode, you need to ensure that all the libraries and your web application must be compiled into 32-bit, The website won't work if some of the library or apps that are compiled using 64bit. I do not really about ColdFusion, but my suspect your CF is not 64bit, you need to install 32bit version, as far as I know by default CF will install 64bit on 64bit environment.

0
khairilCommented:
Opps.. "but my suspect your CF is not 64bit," -> not 32bit actually.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DavidInsight and Energy SpecialistAuthor Commented:
The technical steps for running the 32-bit DLL under 64-bit OS were not spelled out.  It did provide good tips in the right direction.  The alternate, recompiling, is simpler and I have already heard from the DLL author that they will try to recompile under "AnyCPU" option.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.