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.

COM Interop & .NET Assembly Location

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tyler - 17 Jan 2005 13:51 GMT
I have experienced a problem similar to that of a topic previously covered
in this group - 'Regasm.exe Interop problem'.  However, I would like to try
to go a little deeper so that I better understand what is happening.

As in the 'Regasm.exe Interop problem', when attempting to use my C#
component via COM interop, I get an error saying that it cannot locate the
specified file.  I expect that this problem is due to the fact that I was,
to begin, using the standard '1.0.*.*' version number and then later changed
to '1.0.0.0' so that I could control the version numbers.  This resulted in
the COM registration keys having more than 1 version under the
InprocServer32 registry key.  As outlined in the previous post, I expect
that COM (or the SCM?) was using the most recent version (the one I was
trying to obsolete - something like 1.0.1840.2567) instead of the 1.0.0.0
that I wanted it to use.

My question is, when I look at those COM registration keys (most notably
InprocServer32) I cannot determine where the actual DLL assemblies are
located that implement a particular version.  How does my system locate the
correct .NET assembly to implement the functionality?  In regular COM, it
always points to a path to the DLL - how does this work with .NET assemblies
and interop?

Thanks, Tyler
Marty Garins - 17 Jan 2005 17:45 GMT
Tyler,

You should find values for Assembly, Class, CodeBase in the InprocServer32 key

The Assembly loader found in mscoree.dll will use these to load your
assembly through probing.

More information on this process can be found here.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstep4locatingassemblyt
hroughcodebasesorprobing.asp?frame=true


Marty

> I have experienced a problem similar to that of a topic previously covered
> in this group - 'Regasm.exe Interop problem'.  However, I would like to try
[quoted text clipped - 19 lines]
>
> Thanks, Tyler
Tyler - 17 Jan 2005 19:01 GMT
Thanks, I think I've isolated my problem, so that was helpful.

Tyler

> Tyler,
>
[quoted text clipped - 4 lines]
>
> More information on this process can be found here.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstep4locatingassemblyt
hroughcodebasesorprobing.asp?frame=true


> Marty
>
[quoted text clipped - 21 lines]
> >
> > Thanks, Tyler

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.