From 73cb7a5dd27fe2929d95ac0827e89234874de9e8 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 26 Nov 2008 21:54:35 +0000 Subject: [PATCH] Add SuppressUnmanagedCodeSecurity and SetLastError attributes. --- Source/OpenTK/Platform/Windows/API.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/API.cs b/Source/OpenTK/Platform/Windows/API.cs index d55282d0..9a89dbd0 100644 --- a/Source/OpenTK/Platform/Windows/API.cs +++ b/Source/OpenTK/Platform/Windows/API.cs @@ -470,11 +470,8 @@ namespace OpenTK.Platform.Windows #region SwapBuffers - /// - /// - /// - /// - [DllImport("gdi32.dll")] + [SuppressUnmanagedCodeSecurity] + [DllImport("gdi32.dll", SetLastError=true)] [return: MarshalAs(UnmanagedType.Bool)] internal static extern bool SwapBuffers(IntPtr dc); @@ -1433,8 +1430,8 @@ namespace OpenTK.Platform.Windows #endregion #region PixelFormatDescriptor - - #pragma warning disable 0169 + + #pragma warning disable 0169 /// /// Describes a pixel format. It is used when interfacing with the WINAPI to create a new Context. @@ -1469,8 +1466,8 @@ namespace OpenTK.Platform.Windows internal int LayerMask; internal int VisibleMask; internal int DamageMask; - } - + } + #pragma warning restore 0169 #endregion