Groups | Blog | Home
all groups > dotnet compact framework > november 2004 >

dotnet compact framework : How to create component in AppDomain



Chris Walker
11/30/2004 10:09:13 PM
On the desktop, I can create an AppDomain and then load an assembly into
it -- and then create a component in that appdomain and get a reference to
it.

With the compact framework, I can create an AppDomain and launch an
executable in it.

How can I load an assembly into an AppDomain under Windows CE, and then how
can I create an instance of a component from that DLL?

Under .NET, I would do something like:
newAppDomain.CreateInstanceFromAndUnwrap(assemblyPath,
"Project1.AppDomainTestComponent")

Under .NET CF, I have no idea :)

Chris


Chris Walker
12/1/2004 6:12:44 AM
So is there no way to create an AppDomain in which to create an object? As
it stands right now, it seems that .NET CF only allows AppDomains to launch
additional programs, basically.

There is a project on the Internet (without source available) called NADABS
which purports to do exactly this under .NET CF.

Chris

[quoted text, click to view]

Daniel Moth
12/1/2004 10:18:22 AM
CreateInstanceFromAndUnwrap is not supported on the CF. I believe you are
probably out of luck in this area.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


[quoted text, click to view]

Daniel Moth
12/1/2004 2:04:12 PM
You pretty much have the picture... Usually when you manually load an
appdomain it is because you would like to manually unload it later... that
is not supported either (or unloading assemblies). Sounds like you have to
design around this.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


[quoted text, click to view]


roro
12/4/2004 7:45:02 AM
Hi,

have u figured out a way to solve that problem ( i.e AppDomain.Unload) ?
How about NADABS ?? it seems to solve the problem, but will they be willing
to give the source code?
+ plz any idea if this is solved in CF 2.0 ?

kindly send reply to rawadkhalife<AT>gmail.com or on this forum.
tnx

[quoted text, click to view]
AddThis Social Bookmark Button