"Justin Starnes" <jlstarnes@char tertn.net> wrote in message
news:%23nEdYLYg DHA.2748@TK2MSF TNGP11.phx.gbl. ..[color=blue]
> Is it possible to late bind to a dll written in C# from VB6? If so, does
> anyone have an example.
>
>[/color]
Hi,
[color=blue]
> Is it possible to late bind to a dll written in C# from VB6? If so, does
> anyone have an example.[/color]
It's possible but you need somehow instantiate this object. mscoree.dll
exposes undocumented ClrCreateManage dInstance function, it's declared in
mscoree.h as the following:
Or you can use technique described in "Microsoft .NET: Implement a Custom
Common Language Runtime Host for Your Managed App" MSDN Magazine article to
create CLR by CorBindToRuntim eEx call, then Start it, and then create or
retrieve default domain by ICorRuntimeHost ::CreateDomain/GetDefaultDomai n,
and after use it to instantiate class instance - e.g.
AppDomain.Creat eInstanceFrom.
Hi,
[color=blue]
> Is it possible to late bind to a dll written in C# from VB6? If so, does
> anyone have an example.[/color]
It's possible but you need somehow instantiate this object. mscoree.dll
exposes undocumented ClrCreateManage dInstance function, it's declared in
mscoree.h as the following:
Or you can use technique described in "Microsoft .NET: Implement a Custom
Common Language Runtime Host for Your Managed App" MSDN Magazine article to
create CLR by CorBindToRuntim eEx call, then Start it, and then create or
retrieve default domain by ICorRuntimeHost ::CreateDomain/GetDefaultDomai n,
and after use it to instantiate class instance - e.g.
AppDomain.Creat eInstanceFrom.
If you mean classic late binding as in VB CreateObject("P rogid") and
IDispatch-based calls, start with Type.GetTypeFro mProgID.
--
Phil Wilson [MVP Windows Installer]
"Justin Starnes" <jlstarnes@char tertn.net> wrote in message
news:%23nEdYLYg DHA.2748@TK2MSF TNGP11.phx.gbl. ..[color=blue]
> Is it possible to late bind to a dll written in C# from VB6? If so, does
> anyone have an example.
>
>[/color]
Comment