using System.Runtime.InteropServices; using System.Text; namespace Pilz.Win32.Native; public class Kernel32 { private const string LIB_KERNEL32 = "kernel32.dll"; [DllImport(LIB_KERNEL32)] public static extern uint GetModuleFileName(nint hModule, StringBuilder lpFilename, int nSize); }