Actually the following VB6 code works fine for me,
Dim ch As New CorRuntimeHost
Dim defDomain As AppDomain
Private Sub Command1_Click()
Dim asm As Assembly
Set asm = defDomain.Load_2("mscorlib")
Dim objHandle As ObjectHandle
Set objHandle = defDomain.CreateInstance("mscorlib",
"System.Runtime.InteropServices.RegistrationServices")
Dim rs As RegistrationServices
Set rs = objHandle.Unwrap
rs.RegisterAssembly asm, AssemblyRegistrationFlags_None
End Sub
Private Sub Form_Load()
ch.Start
ch.GetDefaultDomain defDomain
End Sub
Private Sub Form_Unload(Cancel As Integer)
ch.Stop
End Sub
(I am registering mscorlib as I was too lazy to develop an assembly to
register it). But I think the code would work for any assebmly
-----Original Message-----
From: Sam Gentile [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 30, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Trying to programatically register Assemblies
throug h CCW for COM?
Shoot, that's what I was suspecting...
>From: "Sievert, James A" <[EMAIL PROTECTED]>
>Reply-To: dotnet discussion <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [DOTNET] Trying to programatically register Assemblies
throug
> h CCW for COM?
>Date: Thu, 30 May 2002 13:26:59 -0500
>
>I think you're stuck loading them from managed code as all assembly
>loading is done directly or indirectly via managed static methods. :-(
>
>Of course, you could always spawn regasm...
>
>You can read messages from the DOTNET archive, unsubscribe from DOTNET,
>or subscribe to other DevelopMentor lists at
>http://discuss.develop.com.
---------------------
Sam Gentile
.NET Consultant
Co-author: Wrox Visual C++ .NET: A primer for C++ developers
BLOG: http://radio.weblogs.com/0105852/
http://www.project-inspiration.com/sgentile/DotNet.htm
http://www.project-inspiration.com/sgentile/
---------------------------
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.