Home All Groups Group Topic Archive Search About
Author
14 Jun 2005 2:29 PM
chiba
Hi,

Is it possible to restrict only Win32 API calls and allow COM calls using
Code Access Security?
The Security Permission for Unmanaged Code doesn´t make distinction between
them.

Thanks,

Chiba

Author
15 Jun 2005 12:55 PM
Nicole Calinoiu
Not in general.  However, if you wish to do this for a particular assembly,
you could create a custom permission for COM interop calling, then demand
this in your assembly prior to asserting unmanaged code permission and
making the interop call.  However, in this sort of scenario, it would
probably be more useful to demand a permission that is more closely aligned
with the action that the COM target is going to take rather than demanding
some generic COM interop permission.



Show quoteHide quote
"chiba" <ch***@discussions.microsoft.com> wrote in message
news:2BFA042B-2FE8-4710-90C3-4784FAC367F5@microsoft.com...
> Hi,
>
> Is it possible to restrict only Win32 API calls and allow COM calls using
> Code Access Security?
> The Security Permission for Unmanaged Code doesn´t make distinction
> between
> them.
>
> Thanks,
>
> Chiba
>
>
>