c# - should I just set SuppressUnmanagedCodeSecurity for maximum performance? -
am correct if need maximum performance, , have trusted library should set suppressunmanagedcodesecurity attribute dll imports have?
i.e. convert such import:
[dllimport("srl.dll", charset = charset.ansi)] private static extern string errormsg(int errcode);
to such import:
[dllimport("srl.dll", charset = charset.ansi), suppressunmanagedcodesecurity] private static extern string errormsg(int errcode);
everywhere.
are there reasons not set suppressunmanagedcodesecurity?
Comments
Post a Comment