标签:extern class filename pac name efi div kernel string
using System.Runtime.InteropServices;
#region
/// <summary> /// 取exe文件绝对路径 /// </summary> /// <param name="hModule"></param> /// <param name="lpFileName"></param> /// <param name="nSize"></param> /// <returns></returns> [DllImport("kernel32")] public static extern int GetModuleFileName(IntPtr hModule, [Out] StringBuilder lpFileName,int nSize); #endregion
#region IntPtr processHandle = IntPtr.Zero; StringBuilder exeFileNamestrB = new StringBuilder(260); GetModuleFileName(processHandle, exeFileNamestrB, exeFileNamestrB.Capacity); #endregion
标签:extern class filename pac name efi div kernel string
原文地址:https://www.cnblogs.com/qq2806933146xiaobai/p/13930701.html