473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CSharp with COM components in 64bit

Hi,
I have a c# application which uses COM DLLs which were build in 32bit
environment.
When I tried to run my program in 64 bit computer, the program crashed when
trying to create a COM class.

can someone please help ?

Yoav.
Mar 8 '07 #1
5 1600
"Yoavo" <yo**@cimatron.co.ilwrote in message
news:e4****************@TK2MSFTNGP04.phx.gbl...
the program crashed
More information please...
Mar 8 '07 #2
"Yoavo" <yo**@cimatron.co.ilwrote in message
news:e4****************@TK2MSFTNGP04.phx.gbl...
Hi,
I have a c# application which uses COM DLLs which were build in 32bit environment.
When I tried to run my program in 64 bit computer, the program crashed when trying to
create a COM class.

can someone please help ?

Yoav.
You can't mix 64 bit and 32 bit code in user applications, so you'll have to compile your
application as 32 bit, to do this:
set the platform to x86 in your project properties or add /platform:x86 as command line
switch.
Willy.

Mar 8 '07 #3
Check this: http://msdn2.microsoft.com/en-us/library/ms973190.aspx

"Yoavo" <yo**@cimatron.co.ilha scritto nel messaggio
news:e4****************@TK2MSFTNGP04.phx.gbl...
Hi,
I have a c# application which uses COM DLLs which were build in 32bit
environment.
When I tried to run my program in 64 bit computer, the program crashed
when trying to create a COM class.

can someone please help ?

Yoav.

Mar 8 '07 #4
Unless you can convert the existing component to out-of-process COM server
(what we are doing for short term migration). In that case the 32-bit/64-bit
interoperability works. It is even quite fast.
"Willy Denoyette [MVP]" <wi*************@telenet.beha scritto nel
messaggio news:%2****************@TK2MSFTNGP02.phx.gbl...
"Yoavo" <yo**@cimatron.co.ilwrote in message
news:e4****************@TK2MSFTNGP04.phx.gbl...
>Hi,
I have a c# application which uses COM DLLs which were build in 32bit
environment.
When I tried to run my program in 64 bit computer, the program crashed
when trying to create a COM class.

can someone please help ?

Yoav.

You can't mix 64 bit and 32 bit code in user applications, so you'll have
to compile your application as 32 bit, to do this:
set the platform to x86 in your project properties or add /platform:x86 as
command line switch.
Willy.

Mar 8 '07 #5
"Laura T." <LT@NOWHERE.COMwrote in message news:Oc*************@TK2MSFTNGP06.phx.gbl...
Unless you can convert the existing component to out-of-process COM server (what we are
doing for short term migration). In that case the 32-bit/64-bit interoperability works. It
is even quite fast.
Even if you can convert, you'll have to keep in mind that It's 100 times slower to marshal
cross-process than calling in process same thread.
Also, if you don't need the extended addressing capabilities of 64 it's actually better to
compile for X86 anyway.

Willy.

Mar 8 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: R.H. | last post by:
I was wondering if anyone knows or could possibly point me to a web site that develops software tools for vb.net that are written in csharp. I have been all over the web trying to find such a...
3
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated...
7
by: Eric Gunnerson | last post by:
If you would like to see this group created, please reply to this post, making sure you leave news.groups on the newsgroups line. "Nigel Perry" <nigel@cosc.canterbury.ac.nz> wrote in message...
11
by: Vijay Chegu | last post by:
I have built a 64bit ATL COM dll. When i register the dll on IA64 windows Enterprise server 2003, i get following error. DllRegisterServer in mydll.dll failed. Return code was : 0x80020009 ...
3
by: Frank Uray | last post by:
Hi all I have written a WindowsService in C# 2005. I am running this service on a 64bit Windows Server 2003 and I like to run some Interop.Excel within this service. It seams that Interop...
4
by: mike | last post by:
I have found that orig tested 64 bit on our 64bit windows 2003 server...about 1 year ago...and company decided to use sql 32 bit on the 64bit os my question and any information is very welcome ...
1
by: GaryDean | last post by:
We have been developing all of our .net applications on 32 bit windows using 32 bit SQL Server. We are being asked to now deploy to servers running 64bit windows and 64bit SQL Server. Are there...
2
by: M O J O | last post by:
(I'm using Visual Studio 2008) I want my new develloper pc to be Vista 64bit, but all my clients are so far 32bit (XP), so my questions are: 1) Is it possible for me to tell VS2008 that the...
12
by: Dom | last post by:
VB had a "line" control, just a simple line that let you separate controls without the wasted space of a Groupbox. Did CSharp drop this? Dom
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.