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 / Component Services / March 2004

Tip: Looking for answers? Try searching our database.

GAC and COM+ Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul James - 18 Mar 2004 14:27 GMT
OK, I have a VB.NET Component that is COM Interopped so it can be
called from a VB6 COM+ DLL.

I have a setup project that places my .NET DLL into the GAC and
registers it. It also registers the associated type library (which
I've put in the system32 directory for now, although I understand I
can use a resource file to avoid putting it on my deployment target at
all).

So, what I end up with is my DLL in the GAC, and the relevant entries
in the registry so I can call my component from my VB6 COM+ DLL.

So, now how can I use REGSVCS in a custom action to register my GAC'd
component with COM+? Bearing in mind that the only copy of my .NET DLL
on my deployment  target is only found in the GAC.

Put another way, how should I register a GAC'd .NET DLL with COM+, if
the only copy of the .NET DLL on the deployment box is in the GAC?
DJM - 18 Mar 2004 18:26 GMT
Register the copy in the GAC.  In fact, I've found that's really the only
way you can get objects in COM+ that can be referenced from a .Net assembly
without keeping the .dll local.

You'll want to shell to a DOS prompt so you can browse the
c:\Windows\assembly directory without having Explorer try to show you a
fancy web page, because you'll need the full path to the dll file.  Then run
something like:

regsvcs /nologo
%SYSTEMROOT%\assembly\gac\BF.Order\1.0.0.0__24d36ca7bfa0e6b0\BF.Order.dll

Alternately, you may be able to get away with lazy registering.  It would
require that the first execution of the object is done by an
Administrator -- maybe have your setup script (which ideally should be run
by an Admin anyway) attempt to start the object itself so that lazy
registering will occur.

> OK, I have a VB.NET Component that is COM Interopped so it can be
> called from a VB6 COM+ DLL.
[quoted text clipped - 14 lines]
> Put another way, how should I register a GAC'd .NET DLL with COM+, if
> the only copy of the .NET DLL on the deployment box is in the GAC?

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.