L
Lloyd Dupont
I'm not exactly sur in which context it is valid / usefull.
For example will it suppres the stack in the following sample below when
using the ScreenGraphics class?
(i.e. I wonder if it will work even if it is not applied to the Gdi32 class,
but to the "consumer" class ScreenGraphics instead...)
internal static class Gdi32
{
[DllExport("GDI32")]
public static extern IntPtr GetHdc(IntPtr hWnd);
}
[SuppressUnmanagedCodeSecurity]
public class ScreenGraphics
{
public Graphics Graphics
{
get
{
IntPtr hdc = Gdi32.GetHdc(IntPtr.Zero);
return Graphics.FromHdc(hdc);
}
}
}
For example will it suppres the stack in the following sample below when
using the ScreenGraphics class?
(i.e. I wonder if it will work even if it is not applied to the Gdi32 class,
but to the "consumer" class ScreenGraphics instead...)
internal static class Gdi32
{
[DllExport("GDI32")]
public static extern IntPtr GetHdc(IntPtr hWnd);
}
[SuppressUnmanagedCodeSecurity]
public class ScreenGraphics
{
public Graphics Graphics
{
get
{
IntPtr hdc = Gdi32.GetHdc(IntPtr.Zero);
return Graphics.FromHdc(hdc);
}
}
}