mirror of
https://github.com/PacktPublishing/Learn-WinUI-3-Second-Edition.git
synced 2026-06-20 12:23:09 +00:00
Add chapter 10 sample project
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace TemplateStudioSampleApp.Helpers;
|
||||
|
||||
public class RuntimeHelper
|
||||
{
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
private static extern int GetCurrentPackageFullName(ref int packageFullNameLength, StringBuilder? packageFullName);
|
||||
|
||||
public static bool IsMSIX
|
||||
{
|
||||
get
|
||||
{
|
||||
var length = 0;
|
||||
|
||||
return GetCurrentPackageFullName(ref length, null) != 15700L;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user