Interop

A

abcd61

I have developed a COM INterop package in vb.net
The dll's for this package reside in a folder named DotNet.

Now, everything s works fine as long as the VB6 program calling this
pachage is above
the DOTNet folder ( the vb6 exe has a config file with probing
privatePath="DotNet" )
so the assemblies in the DOTNET folder successfully load.


Now some questions :

1) How can you get the Com Interop package to work with a vb6 program
when the vb6 program
is not above it in the file path structure ( ie. DotNet folder is not
below the folder
that contains the vb6 program trying to use the Com Interop Package.


2) Now, if you answered "Use the GAC" for the question #1 above, how
come that fails. The vb .net
interop assembly uses the
Microsoft.Practices.EnterpriseLibrary.Common and for some reason the
execution of the program will fail to load the
Microsoft.Practices.EnterpriseLibrary.Common assembly
whenever that assembly is loaded in the GAC ( fuslog dump below).




3) How does one get a vb6 program running in the VB6 IDE to load
assemblies in a Interop package
it uses, since the whiel under tghe IDE is something like /Program
Files/VB6 or something like that,
and the probed filepath or DotNet will not be present under program
files/vb6.



Fuslog dump ( for some reason it want to load
Microsoft.Practices.EnterpriseLibrary.Common.resources ,
I do not have any suc dll on my system).



*** Assembly Binder Log Entry (2/6/2008 @ 11:30:23 AM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file
specified.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework
\v2.0.50727\mscorwks.dll
Running under executable C:\Phase 13\CODE\UI Binaries
\TestPLWSClient.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CSG\MHunter
LOG: DisplayName =
Microsoft.Practices.EnterpriseLibrary.Common.resources,
Version=3.1.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Phase 13/CODE/UI Binaries/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = TestPLWSClient.exe
Calling assembly : Microsoft.Practices.EnterpriseLibrary.Common,
Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Phase 13\CODE\UI Binaries
\TestPLWSClient.exe.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET
\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference:
Microsoft.Practices.EnterpriseLibrary.Common.resources,
Version=3.1.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.DLL.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/en/Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: Attempting download of new URL file:///C:/Phase 13/CODE/UI
Binaries/DotNet/en/
Microsoft.Practices.EnterpriseLibrary.Common.resources/
Microsoft.Practices.EnterpriseLibrary.Common.resources.EXE.
LOG: All probing URLs attempted and failed.
 
A

Armin Zingler

3) How does one get a vb6 program running in the VB6 IDE to load
assemblies in a Interop package
it uses, since the whiel under tghe IDE is something like /Program
Files/VB6 or something like that,
and the probed filepath or DotNet will not be present under program
files/vb6.

I had to add a vb6.exe.config, and I always have to copy the dlls into a
subdir of VB6.exe. Didn't find another solution. I don't use the GAC.


Armin
 
A

abcd61

Yes, I am in the same state, setting up a vb6.exe.config.
I was hoping there was a way I could avoid this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top