using System.Runtime.InteropServices;
public class DllRead
{
//読込む、dllの定義
[DllImport("Kernel32.Dll", EntryPoint="GetPrivateProfileInt")]
public static extern uint GetPrivateProfileInt(string lpAppName,string lpKeyName,
int nDefault,string lpFileName);
public static void Main()
{
uint hoge;
//iniファイルの読込
hoge = GetPrivateProfileInt("app","key",10,@".\file.ini");
System.Console.WriteLine(hoge);
}
}
[app] key=66