"Dave L" <Da***@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Yes, you have the senario correct. I will have this security module
(.dll)
running by the host application (.exe) that needs to monitor other known
modules (.dll's) in the scope of the AppDomain, and look for
instantiations
of this particular base type. Then apply some permissions to the base
types
interface on whether or not the current user has permission to use this
base
type.
I'm not familiar with System.Management and I will read more, thanks for
your help John.
If they're all going to be in the same AppDomain, then they should be able
to communicate with static objects exposed by static properties. You can
even create static events. Your security module could listen for a
NewInstanceConstructing event from the base class, which could pass the
constructor parameters to the event. If you derive the EventArgs from
CancelEventArgs, the security module would be able to set e.Cancel = true to
tell the base class not to permit the instanitation.
It also seems to me that you could do something with remoting, I'm just not
quite sure what.
John Saunders
P.S. Of course, remember that if you're going to use static data, you have
to protected it from multi-threaded access.