指定のINIファイルの指定のセクションのキー名とその値を変更する
Declare Function WritePrivateProfileSection lib "Kernel32.dll" _
Alias "WritePrivateProfileSectionA" _
(ByVal lpAppName As String, ByVal lpString As String, _
ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileSection lib "Kernel32.dll" _
Alias "WritePrivateProfileSectionA" _
(ByVal lpAppName As String, ByVal lpString As String, _
ByVal lpFileName As String) As Integer
BOOL WritePrivateProfileSection(
LPCTSTR lpAppName,
LPCTSTR lpString,
LPCTSTR lpFileName
);
引数
lpAppName
セクション名lpString
キー名とその値を示す文字列lpFileName
INIファイル名戻り値
正常終了のとき 0以外備考
エラーのとき 0
この関数は、指定のセクションの全てのキーをlpStringで置き換える。
lpStringの書式はKey=Valueを一つの単位として、vbNullCharで区切り
最後尾にvbNullStringを加える。
指定のセクションがないとき、セクションを作成したあと、キーとその値を追加する。