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
26 changes: 26 additions & 0 deletions src/ManagedShell.Common/Helpers/EnvironmentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ public static bool IsWindows10RS4OrBetter
}
}

public static bool IsWindows1020H1OrBetter
{
get
{
if (osVersionMajor == 0)
{
getOSVersion();
}

return (osVersionMajor >= 10 && osVersionBuild >= 19041);
}
}

public static bool IsWindows11OrBetter
{
get
Expand All @@ -135,6 +148,19 @@ public static bool IsWindows1122H2OrBetter
}
}

public static bool IsWindows1124H2OrBetter
{
get
{
if (osVersionMajor == 0)
{
getOSVersion();
}

return (osVersionMajor >= 10 && osVersionBuild >= 26100);
}
}

public static bool IsWindows10DarkModeSupported
{
get
Expand Down
4 changes: 4 additions & 0 deletions src/ManagedShell.Interop/NativeMethods.ShlwApi.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using System.Text;

namespace ManagedShell.Interop
{
Expand All @@ -18,5 +19,8 @@ public partial class NativeMethods

[DllImport(ShlwApi_DllName, SetLastError = true)]
public static extern bool SHUnlockShared(IntPtr pvData);

[DllImport(ShlwApi_DllName, BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = false, ThrowOnUnmappableChar = true)]
public static extern int SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, int cchOutBuf, IntPtr ppvReserved);
}
}
Loading