.ini

出自 ProgWiki
前往: 導覽搜尋

.ini檔,參照:『維基百科~INI_file

相關技術

PHP
Win32API
VB6
Declare Function OSGetPrivateProfileString% Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal IpDefault$, ByVal RetString$, ByVal RetSize As Integer, ByVal Filename$)
 
Declare Function OSWritePrivateProfileString% Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal Filename$)
C#
using   System;
using   System.Text;
using   System.Runtime.InteropServices;
 
class   IniOp
{  
        [DllImport("kernel32.dll")]  
        public static extern uint GetPrivateProfileString(
                string   lpAppName,    
                string   lpKeyName,
                string   lpDefault,    
                StringBuilder   lpReturnedString,
                int      nSize,    
                string   lpFileName
        );  
 
        [DllImport("kernel32.dll")]
        public static extern bool WritePrivateProfileString(
                string lpAppName,
                string lpKeyName,
                string lpString,
                string lpFileName
        );
}
C#(來自字串)

相關