[meta]replace FxCopAnalyzers by Microsoft.CodeAnalysis.NetAnalyzers (#16210)

* Replace Microsoft.CodeAnalysis.FxCopAnalyzers by Microsoft.CodeAnalysis.NetAnalyzers

* fix error CA2101: Specify marshaling for P/Invoke string arguments

Microsoft.CodeAnalysis.NetAnalyzers treats CA2101 as an error

* Removed obsolete Analyzer Microsoft.NetCore.Analyzers

* Removed obsolete Analyzer Microsoft.NetFramework.Analyzers

* Removed obsolete Analyzer Microsoft.CodeQuality.Analyzers

* Removed obsolete Analyzer Microsoft.CodeAnalysis.VersionCheckAnalyzer

* fix error CA2101: Specify marshaling for P/Invoke string arguments

Microsoft.CodeAnalysis.NetAnalyzers treats CA2101 as an error
This commit is contained in:
CleanCodeDeveloper
2022-02-11 17:42:17 +01:00
committed by GitHub
parent 9fc3727709
commit f0d084c59c
54 changed files with 90 additions and 181 deletions

View File

@@ -52,10 +52,10 @@ namespace Wox.Plugin.Common.Win32
[DllImport("user32.dll", SetLastError = true)]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
[DllImport("psapi.dll", BestFitMapping = false)]
[DllImport("psapi.dll", BestFitMapping = false, CharSet = CharSet.Unicode)]
public static extern uint GetProcessImageFileName(IntPtr hProcess, [Out] StringBuilder lpImageFileName, [In][MarshalAs(UnmanagedType.U4)] int nSize);
[DllImport("user32.dll", SetLastError = true, BestFitMapping = false)]
[DllImport("user32.dll", SetLastError = true, BestFitMapping = false, CharSet = CharSet.Unicode)]
public static extern IntPtr GetProp(IntPtr hWnd, string lpString);
[DllImport("kernel32.dll", SetLastError = true)]
@@ -70,7 +70,7 @@ namespace Wox.Plugin.Common.Win32
[DllImport("dwmapi.dll", PreserveSig = false)]
public static extern int DwmGetWindowAttribute(IntPtr hwnd, int dwAttribute, out int pvAttribute, int cbAttribute);
[DllImport("user32.dll", BestFitMapping = false)]
[DllImport("user32.dll", BestFitMapping = false, CharSet = CharSet.Unicode)]
public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
[DllImport("user32.dll", SetLastError = true)]