
Signature
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
Hello Joe,
As Peter suggested, if the .NET assembly will be consumed by native
executables, we can register the .NET assembly as COM server.
Regarding how to register the .NET assembly as COM server, please refer to
the following articles:
MSDN: COM Interop Part2: C# Server Tutorial
http://msdn2.microsoft.com/en-us/library/aa645738(VS.71).aspx
codeproject: Calling Managed .NET C# COM Objects from Unmanaged C++ Code
http://www.codeproject.com/KB/cs/ManagedCOM.aspx
I hesitated to recommend that codeproject article because it has an error
in its sample code. The interface IMyDotNetInterface and the class
MyDotNetClass should be declared as public. However, this article
demonstrates how to use regasm
(http://msdn2.microsoft.com/en-us/library/tzat5yw6(VS.71).aspx) to generate
and register tlb (type library).
If you have any other questions or concerns, please feel free to let me
know.
Regards,
Jialiang Ge (jialge@online.microsoft.com, 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@microsoft.com.
==================================================
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.
Joe - 18 Mar 2008 19:50 GMT
Hello,
Currently the application that needs to interact with ours is a .NET
application written in C#. We want the application to be able to launch our
application out of proc. If they just reference our application using a
standard .NET reference then they can call all our applications methods but
it's within their memory space. We don't really want this.
Is this our only option when it comes to .NET calling .NET?
Thanks,
Joe
> Hello Joe,
>
[quoted text clipped - 50 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Christopher Van Kirk - 19 Mar 2008 00:18 GMT
You could consider wrapping the COM with a C# wrapper then remoting that
wrapper from a service. The code running the COM would then be out of
process with your application, but you would have a fair amount of calling
overhead and complexity added in. Of course on the upside you could have
that service running anywhere in the network.
> Hello,
>
[quoted text clipped - 67 lines]
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.

Signature
Posted via a free Usenet account from http://www.teranews.com
Jialiang Ge [MSFT] - 19 Mar 2008 08:32 GMT
Hello Joe and Christopher,
I agree with Christopher's idea. .NET Remoting can help us do the
out-of-proc call from .NET to .NET. Another solution is to use DCOM.
See how to write a DCOM server in C#:
http://blogs.msdn.com/adioltean/archive/2004/06/18/159479.aspx
and how to consume the DCOM server in a C# client:
http://www.thescripts.com/forum/thread49121.html
Regards,
Jialiang Ge (jialge@online.microsoft.com, 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@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
Jialiang Ge [MSFT] - 21 Mar 2008 11:00 GMT
Hi Joe,
I am writing to check the status of the issue. Would you mind letting me
know the result of the suggestions? If you need further assistance, feel
free to let me know. I will be more than happy to be of assistance.
Have a great day!
Regards,
Jialiang Ge (jialge@online.microsoft.com, 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@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================