loading x86-dll with LoadLibraryW in a x64-system

I try to change a printer-port monitor from x86 XP-system to Windows 7 (x64). In this monitor I load a dll dynamically with LoadLibraryW(...) and this is a 32-bit-dll. As one can run a 32-bit-application in a 64-bit-environment I guess that it should be possible to use a 32-bit-dll on a 64-bit-machine. But when I load it I get the error 0xc1 (193), telling me that it is "not a valid Win32 application". How have I to load this 32-bit-dll?
Thanks for your help, Peter
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.

No, you can only load 32bit DLLs from 32bit processes, not from 64bit processes. See http://blogs.msdn.com/oldnewthing/archive/2008/10/20/9006720.aspx ("Why can't you thunk between 32-bit and 64-bit Windows?")

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
formiAuthor Commented:
Thank's for your answer. I'll try to compile it in x64.
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 Development

From novice to tech pro — start learning today.