[quoted text, click to view] Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote in message news:<mnvc80l12ta619jj7vrtg1q0l94ktee8tu@4ax.com>...
> On Mon, 19 Apr 2004 15:26:04 -0700, Harish <anonymous@discussions.microsoft.com> wrote:
>
> ¤ Hi Paul,
> ¤ I changed my code like this as per that MSDN link. But I still got the GAC path. Did I make any mistake in the code?
> ¤ Here is the code.
> ¤
> ¤ Thanks,
> ¤ Harish
> ¤ Dim SampleAssembly As [Assembly]
> ¤ ' Instantiate a target object.
> ¤ Dim Integer1 As New Int32
> ¤ Dim curobj As New WaterMark.clsWaterMark
> ¤ Dim Type1 As Type
> ¤ ' Set the Type instance to the target class type.
> ¤ Type1 = curobj.GetType()
> ¤ ' Instantiate an Assembly class to the assembly housing the Integer type.
> ¤ SampleAssembly = [Assembly].GetAssembly(Type1)
> ¤ ' Gets the location of the assembly using file: protocol.
> ¤ strPath = SampleAssembly.CodeBase
> ¤
> ¤ SampleAssembly = Nothing
> ¤ curobj = Nothing
>
> The code looks OK. I will take a look at this to see if it is the correct approach.
Hi --
I'm latching onto this thread because I'm having the same problem. All
the permutations I've seen of Assembly.GetExecutingAssembly() return a
path that has something to do with the GAC.
I have a C# DLL that I put in
C:\SourceCode\CS\TestInterop\TestInterop.dll, that exposes a public
class Main, and in that class is a public method called FindMe. FindMe
returns a string that points to the location of the DLL. Formerly I
would have used App.Path. But now that's gone :(
I used regasm to create a typelibrary, and I used gacutil.
From VB6 I want to be able to go:
dim o as Object
set o = CreateObject("TestInterop.Main")
msgbox o.FindMe