Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ private static extern object CoCreateInstance(
/// This value is used as a cookie to identify a specific activated activation context.</param>
/// <returns>True on success, false otherwise.</returns>
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport(ExternDll.Kernel32, ExactSpelling = true, PreserveSig = false)]
[DllImport(ExternDll.Kernel32, ExactSpelling = true)]
private static extern bool DeactivateActCtx(int flags, IntPtr activationCtxCookie);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1389,9 +1389,9 @@ public IntPtr Hwnd

private SafeDC() : base(true) { }

#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
protected override bool ReleaseHandle()
{
if (_created)
Expand Down Expand Up @@ -1514,9 +1514,9 @@ internal sealed class SafeHBITMAP : SafeHandleZeroOrMinusOneIsInvalid
{
private SafeHBITMAP() : base(true) { }

#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
protected override bool ReleaseHandle()
{
return NativeMethods.DeleteObject(handle);
Expand All @@ -1527,9 +1527,9 @@ internal sealed class SafeGdiplusStartupToken : SafeHandleZeroOrMinusOneIsInvali
{
private SafeGdiplusStartupToken() : base(true) { }

#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
protected override bool ReleaseHandle()
{
Status s = NativeMethods.GdiplusShutdown(this.handle);
Expand Down Expand Up @@ -1598,9 +1598,9 @@ public void Disconnect()
}

[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
protected override bool ReleaseHandle()
{
try
Expand Down Expand Up @@ -2665,9 +2665,9 @@ public static void DrawMenuBar(IntPtr hWnd)

[SuppressMessage("Mricrosoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[DllImport("kernel32.dll")]
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning disable SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
#pragma warning restore SYSLIB0004 // The Constrained Execution Region (CER) feature is not supported.
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool FindClose(IntPtr handle);

Expand Down Expand Up @@ -3329,7 +3329,7 @@ public static void SHAddToRecentDocs(IShellLinkW shellLink)
public static extern void SHGetItemFromDataObject(IDataObject pdtobj, DOGIF dwFlags, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv);

[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[DllImport("shell32.dll", PreserveSig = false)]
[DllImport("shell32.dll")]
public static extern HRESULT SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv);

[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
Expand Down