Re: call .net 2.0 assemblies from .net 1.1

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Perecli Manole wrote:
> Well, you can call .NET 1.1 and 2.0 assemblies from VB 6.0 or any COM
> framework which is much older. It only stands to reason that there

No. It does not stand to reason.

> should be a way to call .NET 2.0 assemblies from .NET 1.1 which is
> much newer and much closer in design than COM is. Maybe some kind of
> wrapper is needed. Anyone have any advice on how to do this?

Well .NET 2.0 code is not backward compatible with 1.1, so I would not
want to host different versions of the runtim,e in the same process. The
'solution' of using a new appdomain is also dodgy since all appdomains
share the same managed heap. Also threads in a managed process are free
to execute in any app domain - yes, the data is marshalled and the
context is applied, but the *same* thread is used. Threads in .NET
version 2.0 are different to version 1.1, so there is an
incompattibility there. Cowboy's suggestion is best - put the .NET code
into a separate process and access with some interprocess mechanism.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm


.



Relevant Pages

  • Re: DirectShow DMO question
    ... a mixture of Managed .NET code and an unmanaged class ... containing all the DirectShow stuff. ... And that’s the reason why ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Delphi Users - BCBers need you...
    ... but I understand custom memory ... management was introduced for SQLServer/.Net for that very reason, ... so that small bits of .Net code and their GC'ed object will get ...
    (borland.public.delphi.non-technical)
  • Re: Assemply and using Activator.CreateInstance
    ... Unloading assemblies from an AppDomain is a pain and not (IIRC) ... any specific reason you want to do it? ... try is loading it in a separate AppDomain that you can trash ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .NET Soap calls fighting each other in Excel XLAs -- URGENT HELP NEEDED!!!
    ... If they are running in the same instance of Excel, ... the same AppDomain. ... There's no reason at all for the CLR to load them into ... separate AppDomains. ...
    (microsoft.public.dotnet.framework.webservices)