diff options
author | Luqun Lou <luqunl@users.noreply.github.com> | 2018-03-01 01:39:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 01:39:03 +0300 |
commit | 2a8438440b1d2303849822b71fbbf8ddfbaa9f45 (patch) | |
tree | 9a5060967d6ff7dcd23f3316de51c69f7c510c1a | |
parent | 117da3f807d0213002c32e422b68cc059b55b1fa (diff) | |
parent | 38969a9471baf12d1fa451caf901ebf44fcbddb8 (diff) |
Merge pull request #4970 from luqunl/CA2111
Add CA2111 SuppressMessage for these MSDN documented public Pointers
11 files changed, 16 insertions, 0 deletions
diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/bindptr.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/bindptr.cs index 3405ef9a9..1dde60ab2 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/bindptr.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/bindptr.cs @@ -9,10 +9,13 @@ namespace System.Runtime.InteropServices.ComTypes [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)] public struct BINDPTR { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] [FieldOffset(0)] public IntPtr lpfuncdesc; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] [FieldOffset(0)] public IntPtr lpvardesc; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] [FieldOffset(0)] public IntPtr lptcomp; } diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/dispparams.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/dispparams.cs index bea6e7c37..404c768ff 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/dispparams.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/dispparams.cs @@ -9,7 +9,9 @@ namespace System.Runtime.InteropServices.ComTypes [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DISPPARAMS { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr rgvarg; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr rgdispidNamedArgs; public int cArgs; public int cNamedArgs; diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/excepinfo.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/excepinfo.cs index bab6e5fa8..9a0187dda 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/excepinfo.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/excepinfo.cs @@ -18,7 +18,9 @@ namespace System.Runtime.InteropServices.ComTypes [MarshalAs(UnmanagedType.BStr)] public String bstrHelpFile; public int dwHelpContext; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr pvReserved; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr pfnDeferredFillIn; public Int32 scode; } diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/formatetc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/formatetc.cs index 2365cfe9a..b443c2b34 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/formatetc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/formatetc.cs @@ -10,6 +10,7 @@ namespace System.Runtime.InteropServices.ComTypes { [MarshalAs(UnmanagedType.U2)] public short cfFormat; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr ptd; [MarshalAs(UnmanagedType.U4)] public DVASPECT dwAspect; diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/funcdesc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/funcdesc.cs index ab249c469..63e665339 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/funcdesc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/funcdesc.cs @@ -10,7 +10,9 @@ namespace System.Runtime.InteropServices.ComTypes public struct FUNCDESC { public int memid; //MEMBERID memid; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam; public FUNCKIND funckind; //FUNCKIND funckind; public INVOKEKIND invkind; //INVOKEKIND invkind; diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/idldesc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/idldesc.cs index 189287924..31493355e 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/idldesc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/idldesc.cs @@ -9,6 +9,7 @@ namespace System.Runtime.InteropServices.ComTypes [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct IDLDESC { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr dwReserved; public IDLFLAG wIDLFlags; } diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/paramdesc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/paramdesc.cs index bc0d107e1..809ce145c 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/paramdesc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/paramdesc.cs @@ -9,6 +9,7 @@ namespace System.Runtime.InteropServices.ComTypes [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct PARAMDESC { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr lpVarValue; public PARAMFLAG wParamFlags; } diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/stgmedium.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/stgmedium.cs index cdb8015ac..77505cd72 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/stgmedium.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/stgmedium.cs @@ -9,6 +9,7 @@ namespace System.Runtime.InteropServices.ComTypes public struct STGMEDIUM { public TYMED tymed; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr unionmember; [MarshalAs(UnmanagedType.IUnknown)] public object pUnkForRelease; diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typeattr.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typeattr.cs index bf4488b72..3e6381192 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typeattr.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typeattr.cs @@ -18,6 +18,7 @@ namespace System.Runtime.InteropServices.ComTypes public Int32 dwReserved; public Int32 memidConstructor; public Int32 memidDestructor; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr lpstrSchema; public Int32 cbSizeInstance; public TYPEKIND typekind; diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typedesc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typedesc.cs index 29d9a2e9e..696f439ad 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typedesc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/typedesc.cs @@ -9,6 +9,7 @@ namespace System.Runtime.InteropServices.ComTypes [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct TYPEDESC { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] public IntPtr lpValue; public Int16 vt; } diff --git a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/vardesc.cs b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/vardesc.cs index 2a349f42a..abc4b70d7 100644 --- a/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/vardesc.cs +++ b/src/System.Private.Interop/src/System/Runtime/InteropServices/ComTypes/vardesc.cs @@ -17,6 +17,7 @@ namespace System.Runtime.InteropServices.ComTypes { [FieldOffset(0)] public int oInst; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Justification="Backwards compatibility")] [FieldOffset(0)] public IntPtr lpvarValue; }; |