I am defining a Color from argb , ex
Color.FromArgb(255,255,0,0);
In visual studio 2012 , winRT application it says that this is tagged with [security critical] . Are there any reasons why? I tried searching, no results. And no idea why this relates to security.
Update:
Now I notice, not only does FromArgb(...); methods gives this [SECURITY CRITICAL] warning. any of these:
c.A = 255;
c.R = 255;
c.G = 0;
c.B = 0;
Also does.
System.Drawing is a wrapper around unmanaged GDI+ code. From my understanding, WinRT does not support GDI+:
http://social.msdn.microsoft.com/Forums/en-NZ/winappswithnativecode/thread/0ba00fbd-183f-4df6-afa2-04d0ac14706a
Native rendering code will need to be done with Direct2D.
Your message is not a Warning, is information about method signature attribute.
SECURITY CRITICAL is a code Attribute wich real class name is SecurityCriticalAttribute. This attribute must be given to methods thats need full trust to execute code ( usually native code calls, unsafe code, graphics resources (wich usually needs unmanaged code etc.) ).
If methods are not granted full trust the Security Critical method raise an exception.
more info: http://msdn.microsoft.com/en-us/library/system.security.securitycriticalattribute.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With