1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert 34407aaeec Core - Made graphics context providable by UI
Windows - Implemented Vulkan graphics context
Splash screen - Tweaked design
2022-05-06 18:19:02 +02:00

21 lines
670 B
C#

using System;
using System.Runtime.InteropServices;
namespace Artemis.UI.Windows.SkiaSharp.Vulkan;
internal class Kernel32
{
private const string kernel32 = "kernel32.dll";
static Kernel32()
{
CurrentModuleHandle = GetModuleHandle(null);
if (CurrentModuleHandle == IntPtr.Zero)
throw new Exception("Could not get module handle.");
}
public static IntPtr CurrentModuleHandle { get; }
[DllImport(kernel32, CallingConvention = CallingConvention.Winapi, BestFitMapping = false, ThrowOnUnmappableChar = true)]
public static extern IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPTStr)] string lpModuleName);
}