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 / June 2005

Tip: Looking for answers? Try searching our database.

Interop DLL linking

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnMSyrasoft - 06 Jun 2005 21:31 GMT
I have an ASP.NET (1.1) webpage that has a reference to a VB 6 COM DLL
(SMS_AR.DLL).  That part works.  However, the COM DLL has a reference to a
VB.NET 2003 DLL (SMS_PCC.DLL).  

In my project References folder, I see Interop.ADODB and Interop.SMS_AR.  I
put the SMS_PCC.DLL into the \Windows\System32, copied in RegAsm.exe and used
that from the command prompt and got a "Types registered successfully"
response.  Unfortunately, this doesn't work.

So, what might I be missing?  Where does a COM DLL look for dependencies
when called by a .NET 2003 client?

Before you post what you're thinking - I really can't update the SMS_AR.DLL
to .NET right now.  I know having it as the middle component is causing my
issue here but there has to be something.  If I call the SMS_AR.DLL from a VB
6 project, everything works wonderfully!  So there must be something obvious
I'm missing for the call stack in Visual Studio .NET.

Your thoughts are appreciated!
Mattias Sjögren - 06 Jun 2005 22:52 GMT
>So, what might I be missing?  Where does a COM DLL look for dependencies
>when called by a .NET 2003 client?

The COM library doesn't really look for dependencies itself, it uses
standard COM services.

The CLR will try to load the assembly using its rules, looking in the
application directory, GAC and the registered codebase if any. You can
use Fuslogvw.exe to view the exact binding procedure.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

JohnMSyrasoft - 07 Jun 2005 14:02 GMT
Thanks for your reply.  Here's what I have that doesn't seem to be working.

> The CLR will try to load the assembly using its rules, looking in the
> application directory, GAC and the registered codebase if any.

In my \inetpub\wwwroot\webapplication1\bin folder, I copied the SMSPCC.DLL
(again, this is the .NET 2003 DLL that the COM DLL is calling).  By the way,
VS 2003 put an Interop.ADODB.dll and Interop.SMS_AR.dll into this folder
automatically.  Since the SMS_AR is the COM object written in VB6, these two
files make sense to me.

I used RegAsm to register the SMSPCC.DLL in the \bin folder.  However, it
still isn't working for me.  Does this qualify as the 'application directory'
as you posted?

I'm not sure I want to put the assembly in the GAC as it doesn't have a
strong name.  Plus, for deployment, it'd be easier if I could just get it
working in the application directory.

Thanks.

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.