From 64-bit .Net to 32-bit com+

B

Brian

I am currently trying to update an Access Database on an Itanium box
and know that the assembly has to be ran in 32-bit mode because there
are no Jet Drivers for 64-bit mode. So I figure the best way is to
create a com+ dll in C# with the x86 switch turned on and have that
transactionally update Access. I have successfully installed this
using the 32bit .Net Framework registration program. Now my problem
seems to be how to reference this com plus dll correctly from a 64bit
Windows Service. If I point to the assembly in my references in the 64
bit app and try to compile I get a badimageformat exception. If I
recompile the assembly in 64-bit mode and reference it locally then
the app will compile, but it will try to run the access methods 64-bit
mode and nothing will happen. Any ideas how to reference a 32bit com
plus dll from a 64bit windows service? Thanks,

Brian
 
W

Willy Denoyette [MVP]

Brian said:
I am currently trying to update an Access Database on an Itanium box
and know that the assembly has to be ran in 32-bit mode because there
are no Jet Drivers for 64-bit mode. So I figure the best way is to
create a com+ dll in C# with the x86 switch turned on and have that
transactionally update Access. I have successfully installed this
using the 32bit .Net Framework registration program. Now my problem
seems to be how to reference this com plus dll correctly from a 64bit
Windows Service. If I point to the assembly in my references in the 64
bit app and try to compile I get a badimageformat exception. If I
recompile the assembly in 64-bit mode and reference it locally then
the app will compile, but it will try to run the access methods 64-bit
mode and nothing will happen. Any ideas how to reference a 32bit com
plus dll from a 64bit windows service? Thanks,

Brian


The COM+ package must be registered as a "Server type" application not a
"Library type", that is, it must run out-of-process.
Note also that 32 bit applications (under WOW64) on Itanium take a serious
performance hit, as the code does not run natively.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top