Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to mark a .net assembly as safe?
  2. [assembly: CLSCompliant(true)]
  3. namespace MyApplication
  4.        
  5. int error;
  6. unsafe
  7. {
  8.     error = 0x80004005;
  9. }
  10.        
  11. [SuppressUnmanagedCodeSecurity]
  12. internal static class UnsafeNativeMethods
  13. {
  14.    ...          
  15. }
  16.        
  17. [SuppressUnmanagedCodeSecurity]
  18. internal static class SafeNativeMethods
  19. {
  20.    ...          
  21. }
  22.        
  23. internal static class SafeNativeMethods
  24. {
  25.    ...          
  26. }