Re: 64 bit C# trying to call a 32 bit CPP ATL Service
- From: "Scott Norberg" <SNORBERG@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 09:43:24 -0500
Your #3 is exactly the situation we have. The C# program is a separate process using a CCW to call into a ATL SERVICE, which is DCOM and should satisfy #3. But this still does NOT work.
"Jialiang Ge [MSFT]" <jialge@xxxxxxxxxxxxxxxxxxxx> wrote in message news:zjpUWXcqIHA.1784@xxxxxxxxxxxxxxxxxxxxxxxxx
Hello Scott,
From your post, my understanding on this issue is: you wonder how to use a
64bit C# client consume a 32bit ALT service. If I'm off base, please feel
free to let me know.
Based on my experience, this is a very common question when developers
migrate applications from 32bit platform to 64bit. The answer that 64bit
process cannot load a 32bit module into its process space, and vice versa,
applies to all the Windows applications, besides this COM scenario. From
your issue description, I see the ALT service is configured as a in-process
component. "In-process" means that the 32bit component will be loaded into
the process space of the client application (64bit). 32bit components are
registered to HKEY_CLASSES_ROOT\WOW64\CLSID in a 64bit system while 64bit
components are registered to HKEY_CLASSES_ROOT\CLSID. Because our 64bit
client cannot find the component with CLSID or ProgID under
HKEY_CLASSES_ROOT\CLSID registry key, the error 0154(Class not registered)
is thrown.
To workaround this 32bit versus 64bit conflict, we have three choices:
1. As you've already tried, we can compile the client application to target
x86 platform that is compatible with the COM component. The problem of this
workaround is that none 64bit client can consume the component.
2. We build a 64bit version of the ATL service, apart from the 32bit one.
Then register both on the 64bit machine. In this way, all clients
(regardless of whether 32bit or 64bit) can consume the component.
3. We configure the 32bit ATL service as out-of-process component (e.g.
DCOM), so that the 64bit client process can access the 32-bit DLL across a
process boundary when the 32-bit DLL is loaded into a separate 32-bit
surrogate process space.
I'd also suggest you read
http://dnjonline.com/article.aspx?ID=jun07_access3264, and the articles in
its "References" section. They describe the 64-bit versus 32-bit issue in
very detail.
Let me know if you have any other questions or concerns.
Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: 64 bit C# trying to call a 32 bit CPP ATL Service
- From: Willy Denoyette [MVP]
- Re: 64 bit C# trying to call a 32 bit CPP ATL Service
- References:
- 64 bit C# trying to call a 32 bit CPP ATL Service
- From: Scott
- RE: 64 bit C# trying to call a 32 bit CPP ATL Service
- From: Jialiang Ge [MSFT]
- 64 bit C# trying to call a 32 bit CPP ATL Service
- Prev by Date: RE: DCOM security question
- Next by Date: Re: DCOM security question
- Previous by thread: RE: 64 bit C# trying to call a 32 bit CPP ATL Service
- Next by thread: Re: 64 bit C# trying to call a 32 bit CPP ATL Service
- Index(es):
Relevant Pages
|
Loading