Repository: meesoft/PhotoLocator
Pull request #24: Fix warnings
Author: login: meesoft
Created: 2025-03-27T21:30:44Z | Merged: 2025-03-28T21:07:46Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Chores**
	- Streamlined project configuration to enhance code quality analysis.
- **Bug Fixes**
	- Corrected an internal syntax issue to ensure reliable execution of processing routines.
- **Refactor**
	- Improved parameter handling and method signatures for better maintainability.
	- Updated variable and field declarations for increased consistency and reliability.
	- Modified access modifiers for enhanced encapsulation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/.sonarcloud.properties b/.sonarcloud.properties
index 0539477..e6b3307 100644
--- a/.sonarcloud.properties
+++ b/.sonarcloud.properties
@@ -1,4 +1,5 @@
-sonar.exclusions=MapUiTools/**
+sonar.exclusions=MapUiTools/**, PhotoLocator/Helpers/ShellContextMenu.cs
 
-sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S3236
-sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S3776
+sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107
+sonar.issue.ignore.multicriteria.e2.ruleKey=csharpsquid:S3236
+sonar.issue.ignore.multicriteria.e3.ruleKey=csharpsquid:S3776
diff --git a/PhotoLocator.sln b/PhotoLocator.sln
index 7882cb8..92eb170 100644
--- a/PhotoLocator.sln
+++ b/PhotoLocator.sln
@@ -11,10 +11,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 		.editorconfig = .editorconfig
 		.gitignore = .gitignore
 		Directory.Build.props = Directory.Build.props
+		.sonarcloud.properties = .sonarcloud.properties
 		.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
 		LICENSE = LICENSE
 		README.md = README.md
-		sonar-project.properties = sonar-project.properties
 	EndProjectSection
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapUiTools.WPF", "MapUiTools\WPF\MapUiTools.WPF.csproj", "{F3B40BD6-38BB-4F20-BC77-07C368CE0753}"
diff --git a/PhotoLocator/Gps/KmlDecoder.cs b/PhotoLocator/Gps/KmlDecoder.cs
index b46a9bd..5e1aaf2 100644
--- a/PhotoLocator/Gps/KmlDecoder.cs
+++ b/PhotoLocator/Gps/KmlDecoder.cs
@@ -101,7 +101,7 @@ public static IEnumerable<GpsTrace> DecodeStream(Stream stream, TimeSpan minimum
                             Interpolate(startTime, endTime, (double)i / (placemark.Coordinates.Count - 1))), placemark.StartTime.Kind));
                     }
                 }
-            };
+            }
             if (trace.Locations.Count > 0)
                 yield return trace;
         }
diff --git a/PhotoLocator/Helpers/MouseCursorOverride.cs b/PhotoLocator/Helpers/MouseCursorOverride.cs
index 199aa5d..621b610 100644
--- a/PhotoLocator/Helpers/MouseCursorOverride.cs
+++ b/PhotoLocator/Helpers/MouseCursorOverride.cs
@@ -5,7 +5,7 @@ namespace PhotoLocator.Helpers
 {
     public sealed class MouseCursorOverride : IDisposable
     {
-        private Cursor _previousCursor;
+        private readonly Cursor _previousCursor;
 
         /// <summary>
         /// Set cursor, null for default wait cursor
diff --git a/PhotoLocator/Helpers/ShellContextMenu.cs b/PhotoLocator/Helpers/ShellContextMenu.cs
index 4f2d3bc..ccb4273 100644
--- a/PhotoLocator/Helpers/ShellContextMenu.cs
+++ b/PhotoLocator/Helpers/ShellContextMenu.cs
@@ -1,5 +1,4 @@
 #nullable disable
-#pragma warning disable CA1003
 #pragma warning disable CA1032
 #pragma warning disable CA1069
 #pragma warning disable CA1401
@@ -11,7 +10,6 @@
 #pragma warning disable CA1823
 #pragma warning disable CA1838
 #pragma warning disable CA2101
-#pragma warning disable CA5392
 #pragma warning disable IDE0045 // Convert to conditional expression
 #pragma warning disable IDE0051 // Remove unused private members
 #pragma warning disable IDE1006 // Naming Styles
@@ -72,7 +70,7 @@ public ShellContextMenu()
         /// <param name="oParentFolder">Parent folder</param>
         /// <param name="arrPIDLs">PIDLs</param>
         /// <returns>true if it got the interfaces, otherwise false</returns>
-        private bool GetContextMenuInterfaces(IShellFolder oParentFolder, IntPtr[] arrPIDLs, out IntPtr ctxMenuPtr)
+        private bool GetContextMenuInterfaces(IShellFolder oParentFolder, IntPtr[] arrPIDLs, ref IntPtr ctxMenuPtr)
         {
             int nResult = oParentFolder.GetUIObjectOf(
                 IntPtr.Zero,
@@ -80,7 +78,7 @@ private bool GetContextMenuInterfaces(IShellFolder oParentFolder, IntPtr[] arrPI
                 arrPIDLs,
                 ref IID_IContextMenu,
                 IntPtr.Zero,
-                out ctxMenuPtr);
+                ref ctxMenuPtr);
 
             if (S_OK == nResult)
             {
@@ -158,7 +156,7 @@ protected override void WndProc(ref Message m)
         #region InvokeCommand
         private void InvokeCommand(IContextMenu oContextMenu, uint nCmd, string strFolder, Point pointInvoke)
         {
-            CMINVOKECOMMANDINFOEX invoke = new CMINVOKECOMMANDINFOEX();
+            var invoke = new CMINVOKECOMMANDINFOEX();
             invoke.cbSize = cbInvokeCommand;
             invoke.lpVerb = (IntPtr)(nCmd - CMD_FIRST);
             invoke.lpDirectory = strFolder;
@@ -225,7 +223,7 @@ private IShellFolder GetDesktopFolder()
             if (null == _oDesktopFolder)
             {
                 // Get desktop IShellFolder
-                int nResult = SHGetDesktopFolder(out pUnkownDesktopFolder);
+                int nResult = SHGetDesktopFolder(ref pUnkownDesktopFolder);
                 if (S_OK != nResult)
                 {
                     throw new ShellContextMenuException("Failed to get the desktop shell folder");
@@ -247,7 +245,7 @@ private IShellFolder GetParentFolder(string folderName)
         {
             if (null == _oParentFolder)
             {
-                IShellFolder oDesktopFolder = GetDesktopFolder();
+                var oDesktopFolder = GetDesktopFolder();
                 if (null == oDesktopFolder)
                 {
                     return null;
@@ -257,7 +255,7 @@ private IShellFolder GetParentFolder(string folderName)
                 IntPtr pPIDL = IntPtr.Zero;
                 uint pchEaten = 0;
                 SFGAO pdwAttributes = 0;
-                int nResult = oDesktopFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, folderName, ref pchEaten, out pPIDL, ref pdwAttributes);
+                int nResult = oDesktopFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, folderName, ref pchEaten, ref pPIDL, ref pdwAttributes);
                 if (S_OK != nResult)
                 {
                     return null;
@@ -266,7 +264,7 @@ private IShellFolder GetParentFolder(string folderName)
                 IntPtr pStrRet = Marshal.AllocCoTaskMem(MAX_PATH * 2 + 4);
                 Marshal.WriteInt32(pStrRet, 0, 0);
                 nResult = _oDesktopFolder.GetDisplayNameOf(pPIDL, SHGNO.FORPARSING, pStrRet);
-                StringBuilder strFolder = new StringBuilder(MAX_PATH);
+                var strFolder = new StringBuilder(MAX_PATH);
                 StrRetToBuf(pStrRet, pPIDL, strFolder, MAX_PATH);
                 Marshal.FreeCoTaskMem(pStrRet);
                 pStrRet = IntPtr.Zero;
@@ -274,7 +272,7 @@ private IShellFolder GetParentFolder(string folderName)
 
                 // Get the IShellFolder for folder
                 IntPtr pUnknownParentFolder = IntPtr.Zero;
-                nResult = oDesktopFolder.BindToObject(pPIDL, IntPtr.Zero, ref IID_IShellFolder, out pUnknownParentFolder);
+                nResult = oDesktopFolder.BindToObject(pPIDL, IntPtr.Zero, ref IID_IShellFolder, ref pUnknownParentFolder);
                 // Free the PIDL first
                 Marshal.FreeCoTaskMem(pPIDL);
                 if (S_OK != nResult)
@@ -301,7 +299,7 @@ protected IntPtr[] GetPIDLs(FileInfo[] arrFI)
                 return null;
             }
 
-            IShellFolder oParentFolder = GetParentFolder(arrFI[0].DirectoryName);
+            var oParentFolder = GetParentFolder(arrFI[0].DirectoryName);
             if (null == oParentFolder)
             {
                 return null;
@@ -315,7 +313,7 @@ protected IntPtr[] GetPIDLs(FileInfo[] arrFI)
                 uint pchEaten = 0;
                 SFGAO pdwAttributes = 0;
                 IntPtr pPIDL = IntPtr.Zero;
-                int nResult = oParentFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, fi.Name, ref pchEaten, out pPIDL, ref pdwAttributes);
+                int nResult = oParentFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, fi.Name, ref pchEaten, ref pPIDL, ref pdwAttributes);
                 if (S_OK != nResult)
                 {
                     FreePIDLs(arrPIDLs);
@@ -340,7 +338,7 @@ protected IntPtr[] GetPIDLs(DirectoryInfo[] arrFI)
                 return null;
             }
 
-            IShellFolder oParentFolder = GetParentFolder(arrFI[0].Parent.FullName);
+            var oParentFolder = GetParentFolder(arrFI[0].Parent.FullName);
             if (null == oParentFolder)
             {
                 return null;
@@ -354,7 +352,7 @@ protected IntPtr[] GetPIDLs(DirectoryInfo[] arrFI)
                 uint pchEaten = 0;
                 SFGAO pdwAttributes = 0;
                 IntPtr pPIDL = IntPtr.Zero;
-                int nResult = oParentFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, fi.Name, ref pchEaten, out pPIDL, ref pdwAttributes);
+                int nResult = oParentFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, fi.Name, ref pchEaten, ref pPIDL, ref pdwAttributes);
                 if (S_OK != nResult)
                 {
                     FreePIDLs(arrPIDLs);
@@ -373,7 +371,7 @@ protected IntPtr[] GetPIDLs(DirectoryInfo[] arrFI)
         /// Free the PIDLs
         /// </summary>
         /// <param name="arrPIDLs">Array of PIDLs (IntPtr)</param>
-        protected void FreePIDLs(IntPtr[] arrPIDLs)
+        protected static void FreePIDLs(IntPtr[] arrPIDLs)
         {
             if (null != arrPIDLs)
             {
@@ -407,7 +405,7 @@ private void InvokeContextMenuDefault(FileInfo[] arrFI)
                     return;
                 }
 
-                if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
+                if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, ref iContextMenuPtr))
                 {
                     ReleaseAll();
                     return;
@@ -495,7 +493,7 @@ private void ShowContextMenu(Point pointScreen)
                     return;
                 }
 
-                if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
+                if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, ref iContextMenuPtr))
                 {
                     ReleaseAll();
                     return;
@@ -579,45 +577,45 @@ private void ShowContextMenu(Point pointScreen)
         private const int S_OK = 0;
         private const int S_FALSE = 1;
 
-        private static int cbMenuItemInfo = Marshal.SizeOf(typeof(MENUITEMINFO));
-        private static int cbInvokeCommand = Marshal.SizeOf(typeof(CMINVOKECOMMANDINFOEX));
+        private static readonly int cbMenuItemInfo = Marshal.SizeOf(typeof(MENUITEMINFO));
+        private static readonly int cbInvokeCommand = Marshal.SizeOf(typeof(CMINVOKECOMMANDINFOEX));
 
         #endregion
 
         #region DLL Import
 
         // Retrieves the IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
-        [DllImport("shell32.dll")]
-        private static extern Int32 SHGetDesktopFolder(out IntPtr ppshf);
+        [DllImport("shell32.dll"), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
+        private static extern Int32 SHGetDesktopFolder(ref IntPtr ppshf);
 
         // Takes a STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, and places the result in a buffer. 
-        [DllImport("shlwapi.dll", EntryPoint = "StrRetToBuf", ExactSpelling = false, CharSet = CharSet.Auto, SetLastError = true)]
+        [DllImport("shlwapi.dll", EntryPoint = "StrRetToBuf", ExactSpelling = false, CharSet = CharSet.Auto, SetLastError = true), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         private static extern Int32 StrRetToBuf(IntPtr pstr, IntPtr pidl, StringBuilder pszBuf, int cchBuf);
 
         // The TrackPopupMenuEx function displays a shortcut menu at the specified location and tracks the selection of items on the shortcut menu. The shortcut menu can appear anywhere on the screen.
-        [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)]
+        [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         private static extern uint TrackPopupMenuEx(IntPtr hmenu, TPM flags, int x, int y, IntPtr hwnd, IntPtr lptpm);
 
         // The CreatePopupMenu function creates a drop-down menu, submenu, or shortcut menu. The menu is initially empty. You can insert or append menu items by using the InsertMenuItem function. You can also use the InsertMenu function to insert menu items and the AppendMenu function to append menu items.
-        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
+        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         private static extern IntPtr CreatePopupMenu();
 
         // The DestroyMenu function destroys the specified menu and frees any memory that the menu occupies.
-        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
+        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         private static extern bool DestroyMenu(IntPtr hMenu);
 
         // Determines the default menu item on the specified menu
-        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
+        [DllImport("user32", SetLastError = true, CharSet = CharSet.Auto), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         private static extern int GetMenuDefaultItem(IntPtr hMenu, bool fByPos, uint gmdiFlags);
 
         #endregion
 
         #region Shell GUIDs
 
-        private static Guid IID_IShellFolder = new Guid("{000214E6-0000-0000-C000-000000000046}");
-        private static Guid IID_IContextMenu = new Guid("{000214e4-0000-0000-c000-000000000046}");
-        private static Guid IID_IContextMenu2 = new Guid("{000214f4-0000-0000-c000-000000000046}");
-        private static Guid IID_IContextMenu3 = new Guid("{bcfce0a0-ec17-11d0-8d10-00a0c90f2719}");
+        private static Guid IID_IShellFolder = new("{000214E6-0000-0000-C000-000000000046}");
+        private static Guid IID_IContextMenu = new("{000214e4-0000-0000-c000-000000000046}");
+        private static Guid IID_IContextMenu2 = new("{000214f4-0000-0000-c000-000000000046}");
+        private static Guid IID_IContextMenu3 = new("{bcfce0a0-ec17-11d0-8d10-00a0c90f2719}");
 
         #endregion
 
@@ -1182,7 +1180,7 @@ Int32 ParseDisplayName(
                 [MarshalAs(UnmanagedType.LPWStr)] 
             string pszDisplayName,
                 ref uint pchEaten,
-                out IntPtr ppidl,
+                ref IntPtr ppidl,
                 ref SFGAO pdwAttributes);
 
             // Allows a client to determine the contents of a folder by creating an item
@@ -1192,7 +1190,7 @@ Int32 ParseDisplayName(
             Int32 EnumObjects(
                 IntPtr hwnd,
                 SHCONTF grfFlags,
-                out IntPtr enumIDList);
+                ref IntPtr enumIDList);
 
             // Retrieves an IShellFolder object for a subfolder.
             // Return value: error code, if any
@@ -1201,7 +1199,7 @@ Int32 BindToObject(
                 IntPtr pidl,
                 IntPtr pbc,
                 ref Guid riid,
-                out IntPtr ppv);
+                ref IntPtr ppv);
 
             // Requests a pointer to an object's storage interface. 
             // Return value: error code, if any
@@ -1210,7 +1208,7 @@ Int32 BindToStorage(
                 IntPtr pidl,
                 IntPtr pbc,
                 ref Guid riid,
-                out IntPtr ppv);
+                ref IntPtr ppv);
 
             // Determines the relative order of two file objects or folders, given their
             // item identifier lists. Return value: If this method is successful, the
@@ -1235,7 +1233,7 @@ Int32 CompareIDs(
             Int32 CreateViewObject(
                 IntPtr hwndOwner,
                 Guid riid,
-                out IntPtr ppv);
+                ref IntPtr ppv);
 
             // Retrieves the attributes of one or more file objects or subfolders. 
             // Return value: error code, if any
@@ -1257,7 +1255,7 @@ Int32 GetUIObjectOf(
             IntPtr[] apidl,
                 ref Guid riid,
                 IntPtr rgfReserved,
-                out IntPtr ppv);
+                ref IntPtr ppv);
 
             // Retrieves the display name for the specified file object or subfolder. 
             // Return value: error code, if any
@@ -1277,7 +1275,7 @@ Int32 SetNameOf(
                 [MarshalAs(UnmanagedType.LPWStr)] 
             string pszName,
                 SHGNO uFlags,
-                out IntPtr ppidlOut);
+                ref IntPtr ppidlOut);
         }
         #endregion
 
@@ -1421,7 +1419,7 @@ public ShellContextMenuException(string message)
     #endregion
 
     #region Class HookEventArgs
-    public class HookEventArgs : EventArgs
+    class HookEventArgs : EventArgs
     {
         public int HookCode;	// Hook code
         public IntPtr wParam;	// WPARAM argument
@@ -1452,7 +1450,7 @@ public enum HookType : int
     #endregion
 
     #region Class LocalWindowsHook
-    public class LocalWindowsHook
+    class LocalWindowsHook
     {
         // ************************************************************************
         // Filter function delegate
@@ -1476,8 +1474,7 @@ public class LocalWindowsHook
         public event HookEventHandler HookInvoked;
         protected void OnHookInvoked(HookEventArgs e)
         {
-            if (HookInvoked != null)
-                HookInvoked(this, e);
+            HookInvoked?.Invoke(this, e);
         }
         // ************************************************************************
 
@@ -1503,7 +1500,7 @@ protected int CoreHookProc(int code, IntPtr wParam, IntPtr lParam)
                 return CallNextHookEx(m_hhook, code, wParam, lParam);
 
             // Let clients determine what to do
-            HookEventArgs e = new HookEventArgs();
+            var e = new HookEventArgs();
             e.HookCode = code;
             e.wParam = wParam;
             e.lParam = lParam;
@@ -1538,7 +1535,7 @@ public void Uninstall()
         #region Win32 Imports
         // ************************************************************************
         // Win32: SetWindowsHookEx()
-        [DllImport("user32.dll")]
+        [DllImport("user32.dll"), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         protected static extern IntPtr SetWindowsHookEx(HookType code,
             HookProc func,
             IntPtr hInstance,
@@ -1547,13 +1544,13 @@ protected static extern IntPtr SetWindowsHookEx(HookType code,
 
         // ************************************************************************
         // Win32: UnhookWindowsHookEx()
-        [DllImport("user32.dll")]
+        [DllImport("user32.dll"), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         protected static extern int UnhookWindowsHookEx(IntPtr hhook);
                               // ************************************************************************
 
         // ************************************************************************
         // Win32: CallNextHookEx()
-        [DllImport("user32.dll")]
+        [DllImport("user32.dll"), DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
         protected static extern int CallNextHookEx(IntPtr hhook,
             int code, IntPtr wParam, IntPtr lParam);
         // ************************************************************************
diff --git a/PhotoLocator/Helpers/WinAPI.cs b/PhotoLocator/Helpers/WinAPI.cs
index cd16787..dcb7135 100644
--- a/PhotoLocator/Helpers/WinAPI.cs
+++ b/PhotoLocator/Helpers/WinAPI.cs
@@ -58,7 +58,7 @@ public struct SHELLEXECUTEINFO
 
         public static void ShowFileProperties(string fileName)
         {
-            SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
+            var info = new SHELLEXECUTEINFO();
             info.cbSize = Marshal.SizeOf(info);
             info.lpVerb = "properties";
             info.lpFile = fileName;


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 4ffe59c7813eca562631db65253946aa2caa2459 and 917b1ff4f951456c83d00db467eb38575362d809.

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `.sonarcloud.properties` (1 hunks)
* `PhotoLocator.sln` (1 hunks)
* `PhotoLocator/Gps/KmlDecoder.cs` (1 hunks)
* `PhotoLocator/Helpers/MouseCursorOverride.cs` (1 hunks)
* `PhotoLocator/Helpers/ShellContextMenu.cs` (27 hunks)
* `PhotoLocator/Helpers/WinAPI.cs` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: build
* GitHub Check: build

</details>

<details>
<summary>🔇 Additional comments (12)</summary><blockquote>

<details>
<summary>PhotoLocator/Helpers/WinAPI.cs (1)</summary>

`61-61`: **Good use of type inference**

Using `var` instead of explicitly typing `SHELLEXECUTEINFO` is a good practice when the type is obvious from the initialization. This makes the code more concise without sacrificing readability.

</details>
<details>
<summary>PhotoLocator.sln (1)</summary>

`14-14`: **Updated SonarCloud configuration**

Added `.sonarcloud.properties` to solution items, replacing the previous `sonar-project.properties` entry. This update reflects the transition to SonarCloud for static code analysis.

</details>
<details>
<summary>PhotoLocator/Helpers/MouseCursorOverride.cs (1)</summary>

`8-8`: **Improved field declaration with readonly modifier**

Adding the `readonly` modifier to the `_previousCursor` field is a good practice since this field is only assigned in the constructor and never modified afterwards. This prevents accidental modification and clearly communicates the intended usage.

</details>
<details>
<summary>PhotoLocator/Helpers/ShellContextMenu.cs (9)</summary>

`226-226`: **Parameter modifier change may cause runtime issues.**

Changing from `out` to `ref` for the `SHGetDesktopFolder` call requires the parameter to be initialized before the method call.

---

`258-258`: **Parameter modifier changes throughout the codebase.**

Multiple parameter modifiers have been changed from `out` to `ref`. Ensure all calling code properly initializes these parameters before method calls.



Also applies to: 275-275, 316-316, 355-355

---

`159-159`: **Improved code readability with type inference.**

Good use of `var` for type inference where the type is obvious from the right side of the assignment.



Also applies to: 248-248, 267-267, 302-302, 341-341, 503-503

---

`374-374`: **Appropriate method modifier change.**

Making `FreePIDLs` static is appropriate since it doesn't use any instance members.

---

`580-581`: **Proper readonly field declarations.**

Good change to make these fields `static readonly` as they're constants that don't need to be recreated for each instance.

---

`588-589`: **Enhanced DLL loading security.**

Adding `DefaultDllImportSearchPaths(DllImportSearchPath.System32)` to DllImport attributes is a good security practice to ensure DLLs are loaded only from trusted locations.



Also applies to: 592-593, 596-609

---

`615-618`: **Simplified GUID constructor syntax.**

The GUID declaration syntax has been simplified, which improves readability without changing functionality.

---

`1477-1477`: **Modern C# null-checking syntax.**

Good use of the null-conditional operator (`?.`) for more concise and safer null checking.

---

`73-81`: <details>
<summary>❓ Verification inconclusive</summary>

**Parameter modifier change may cause runtime issues.**

Changing from `out` to `ref` parameters is a significant behavioral change. With `out`, parameters don't need to be initialized before the method call, but with `ref` they must be. This could cause runtime issues if calling code doesn't initialize the parameter before passing it.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if there are any callers of GetContextMenuInterfaces that might not be initializing the IntPtr before the call

rg -A 2 -B 2 "GetContextMenuInterfaces.*" --glob "*.cs" | grep -v "ref IntPtr"
```

Length of output: 1601

---



</details>

**Attention: Validate Pre-Initialization of iContextMenuPtr for ref Parameter**

The change from an `out` to a `ref` parameter requires that `iContextMenuPtr` is assigned an initial value before the call. Our grep results confirm that the method is now called using `ref iContextMenuPtr`, but it’s critical to verify that every caller properly initializes `iContextMenuPtr` (for example, to `IntPtr.Zero`) before passing it to `GetContextMenuInterfaces`. Please ensure that this pre-initialization is in place throughout the code to avoid potential runtime issues.

- Verify that `iContextMenuPtr` is declared and initialized prior to the calls in **PhotoLocator/Helpers/ShellContextMenu.cs**.
- Confirm that this change in parameter behavior is intentional and that any subsequent logic relies on an already initialized pointer.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-27T21:35:04Z

Review comments:
diff_hunk: @@ -101,7 +101,7 @@ public static IEnumerable<GpsTrace> DecodeStream(Stream stream, TimeSpan minimum
                             Interpolate(startTime, endTime, (double)i / (placemark.Coordinates.Count - 1))), placemark.StartTime.Kind));
                     }
                 }
-            };
+            }
path: PhotoLocator/Gps/KmlDecoder.cs
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fixed syntax error**

The change correctly fixes the code structure by replacing what was likely a semicolon with the proper closing brace. This ensures proper nesting of code blocks and fixes what would have been a compilation error.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-27T21:35:03Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,4 +1,5 @@
 sonar.exclusions=MapUiTools/**
 
+sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107
 sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S3236
-sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S3776
+sonar.issue.ignore.multicriteria.e2.ruleKey=csharpsquid:S3776
path: .sonarcloud.properties
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Configuration conflict in SonarCloud rules.**

Lines 3 and 4 are both defining rules for the same criteria set `e1`, which is likely to cause a conflict. Only one rule should be associated with each criteria identifier.

```diff
 sonar.exclusions=MapUiTools/**

 sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107
-sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S3236
+sonar.issue.ignore.multicriteria.e3.ruleKey=csharpsquid:S3236
 sonar.issue.ignore.multicriteria.e2.ruleKey=csharpsquid:S3776
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
sonar.exclusions=MapUiTools/**

sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107
sonar.issue.ignore.multicriteria.e3.ruleKey=csharpsquid:S3236
sonar.issue.ignore.multicriteria.e2.ruleKey=csharpsquid:S3776
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-27T21:35:03Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-03-27T21:35:00Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough
This PR updates the project’s SonarCloud configuration and several helper components. In the configuration files, a new SonarCloud rule is added while existing ones are reorganized under different criteria. The solution file is updated accordingly to reflect these changes. Additionally, minor corrections and refactorings are applied across the codebase, including a syntax fix in the KML decoder, an updated access modifier in the mouse cursor override, revised parameter passing in shell context menu methods, and the use of type inference in a WinAPI helper. These changes enhance code clarity and correctness.

## Changes

| File(s)                                                  | Change Summary                                                                                                                                                                       |
|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `.sonarcloud.properties`<br>`PhotoLocator.sln`         | Added `sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107`; removed `csharpsquid:S3236` and `csharpsquid:S3776` from criteria e1; added `.sonarcloud.properties` and removed `sonar-project.properties` from solution items.  |
| `PhotoLocator/Gps/KmlDecoder.cs`                         | Fixed control flow in `DecodeStream` by replacing an incorrect semicolon with a closing brace, ensuring proper block termination.                                                  |
| `PhotoLocator/Helpers/MouseCursorOverride.cs`            | Updated the `_previousCursor` field’s access modifier from `private` to `private readonly` to prevent modifications post-object construction.                                      |
| `PhotoLocator/Helpers/ShellContextMenu.cs`               | Modified multiple method signatures to use `ref` instead of `out`, converted `FreePIDLs` to a `protected static` method, updated DllImport attributes with system search paths, and simplified GUID declarations.             |
| `PhotoLocator/Helpers/WinAPI.cs`                         | Replaced an explicit type declaration with `var` in the `ShowFileProperties` method while retaining the same inferred type.                                                       |

## Sequence Diagram(s)
```mermaid
sequenceDiagram
    participant KML as KMLStream
    participant Decoder as KmlDecoder
    participant Trace as TraceHandler
    KML->>Decoder: Send KML data
    Decoder->>Trace: Process placemark block (using proper block closure)
    alt Locations Exist
        Decoder-->>KML: Yield trace result
    else No Locations
        Decoder-->>KML: Complete without yielding
    end
```

## Possibly related PRs
- **meesoft/PhotoLocator#23**: Updates to SonarCloud configuration, including modifications to issue ignoring rules in similar properties files.

## Poem
> I'm a bunny in the code maze, hopping through each line,  
> Fixing bugs with gentle grace and making everything align.  
> My whiskers twitch with every tweak and every little change,  
> In properties and helper classes, my hops have rearranged.  
> Celebrate these fixes with a joyful, bouncy sign! 🐇  
> Happy code, happy hop, all is now just fine!

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 3b728c8d56340387c67f267e25ae7945c8b43fbe and 4f6f9c29f17b1f512afab169ba35cbd08a74fe9c.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `.sonarcloud.properties` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: Analyze (csharp)
* GitHub Check: build
* GitHub Check: build

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>.sonarcloud.properties (4)</summary>

`1-1`: **Exclusion Pattern Updated**  
The updated exclusion now covers both `MapUiTools/**` and `PhotoLocator/Helpers/ShellContextMenu.cs`. Please verify that including `PhotoLocator/Helpers/ShellContextMenu.cs` is intentional and does not exclude any critical files.

---

`3-3`: **Clarified Ignore Rule for e1**  
The rule `sonar.issue.ignore.multicriteria.e1.ruleKey=csharpsquid:S107` is now explicitly defined. This change resolves the conflict by eliminating dual use of the same criteria identifier for different rules.

---

`4-4`: **Proper Segregation of Ignore Rule for e2**  
The new entry `sonar.issue.ignore.multicriteria.e2.ruleKey=csharpsquid:S3236` correctly assigns this rule to e2, ensuring clear and non-conflicting issue ignoring criteria.

---

`5-5`: **Distinct Ignore Rule for e3**  
The configuration line `sonar.issue.ignore.multicriteria.e3.ruleKey=csharpsquid:S3776` provides a separate criteria for this specific rule, effectively avoiding overlap and potential conflicts with other criteria.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AxeAA9IAdzQUM8DEUQGActmYClFwATAAsBgCqiEGQbNL4AGa4RvrG4FBk9Ik4BMRkyjT0TKzsXLz8wqLiUjLyTEpUqupaOqkmUHCoqJg5hKTkVIUKJRickFROkIj+zK7ycgoNKmqa2rpghmmmBhqI+BiuDBb42LQavPjclOLSHAYARI8GAMTPkACCAJJ5A9R0UzM5vwEoxYJhSN4DHASKDwdIUFhcLAYQADXb7Q7HU7nCiXa7waQoyAJeBWBFHU4w5iKeAkhjUeD7ZAESBImEkewUxCMjDITD0CjYKzIBL4PhIaYw+BEDBijxEDQwZGQDlcnk8ag0NyQMEyEhkFX2bj8/4sjwUpSQFEABVg+AIABl8PSCBQAPQACRIFiuFEQboAysiLBYAML7Gj2XAAWTI2A0DEQRLQx083MtbMNSHEnit0bQ3Ai8Gg+HwFn9ACoK2jIJ9EcrBcLiWKUDK5bmJdhpAAaVnK3gkCSM7DIdgUAkilsovYHCgaTskedtiiL5hC8QMcda+BoDQkACMGkbJAA0iRZABeRNgijcRAAR2w8FoHADAGZgm+AGzJjD0acYnOC5LrKK4aGuFgblulA7nuh7Hmel7Xq4d6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YXAJTMBIEDIncDSDPgQIIyRkQrYjBg4s1SRc7XoFUnokEiD9enxn5ntnjnrnnnvnmsf9U/EJXUhk5AGM3BC0MMhEHSEpSqNlNSEcNAUgT3qhMn3sH3ynJw6nAu7jfC94XbeHYi0T791pcimaZXYZUZdXCLz9yv4TGL9W2yF+/31n9nzn7n3nvzBECH4GT4oMWH0kWkl5NBQkLrkL/0VH9H6zr01wQfsn4fsCmHpwOHyf2RfDg7/e+f27wTk7zYdoZaWE3oR7x04oQQrgCYZ7sleYHJJYJoVYVoDYAwU/6/9QYrZ8RAYrU7AkE4DoDFYxSTsdYCf3SCQA6uRXAQPuCFyhAEgdXMkq2zJJfgGA25N8OVwki0ABAI7TCCQAEBvhtyZJTCGSW/DBBaA25CSHV3AEf9IBb4AQJhGCDbl0BtAVAW+FCASQiBmEBgF+EwhNc+BJAYIGSTQAkBMIdXUIGSXQG4C3wCQQILQNP4ICvwiAhgMEDq4JAYBcA5AcEEFwqB9wX4OrgIDQBvgpBAgcrtuTQCYQEBJAOriMlSB0CIAwwDtLgB/7Xp/+NuLaMAMyDgCgAA== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=meesoft/PhotoLocator&utm_content=24):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai plan` to trigger planning for file edits and PR creation.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: sonarqubecloud[bot]
created_at: 2025-03-28T20:29:51Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=meesoft_PhotoLocator&pullRequest=24) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=meesoft_PhotoLocator&pullRequest=24&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=meesoft_PhotoLocator&pullRequest=24&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=meesoft_PhotoLocator&pullRequest=24&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=meesoft_PhotoLocator&pullRequest=24&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=meesoft_PhotoLocator&pullRequest=24&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=meesoft_PhotoLocator&pullRequest=24)


author_association: NONE