Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / January 2005

Tip: Looking for answers? Try searching our database.

C++ Interop - Mixing unmanaged & managed worlds

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luis Fajardo - 27 Jan 2005 22:15 GMT
I have a C++ (mixed .dll managed & unmanaged) to expose a C# class to the
unmanage world.  I'm creating an unmanaged method that calls a C++ managed
method that forwards the request to my C# class.

Traditional unmanaged code -> Unmanaged Wrapper -> Managed Wrapper -> C#

Everything is working fine, but my question is:

Do I need to have the C# assembly registered on the GAC for this to work, if
I don't do that, appears to me that C++ Managed doesn't find the C# assembly.
I'll like not to do that, so I can use xcopy deployment.

Thanks in advance
Daniel Petersson - 28 Jan 2005 13:57 GMT
No, You don't need to hace the C# wrapper registered in the GAC
but he fusion algorithm that locates the assembly needs to be able
to find the assembly according to it's normal lookup algorithm.

The easiest way to make fusion locate your assembly is to copy
it into the same directory as where the image of your process is
stored, ie where your .exe is located. There are several other
possible locations for the assembly but you can find information
about these at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conHowRuntimeLocatesAssemblies.asp


best regards
Daniel Petersson, Cefalo
daniel.petersson@cefalo.se

> I have a C++ (mixed .dll managed & unmanaged) to expose a C# class to the
> unmanage world.  I'm creating an unmanaged method that calls a C++ managed
[quoted text clipped - 9 lines]
>
> Thanks in advance

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.