INIファイル内の全てのセクション名を取得する
Declare Function GetPrivateProfileSectionNames lib "Kernel32.dll" _
Alias "GetPrivateProfileSectionNamesA" _
(ByVal lpszReturnBuffer As String, ByVal nSize As Long, _
ByVal lpFileName As String) As Long
Declare Function GetPrivateProfileSectionNames lib "Kernel32.dll" _
Alias "GetPrivateProfileSectionNamesA" _
(ByVal lpszReturnBuffer As String, ByVal nSize As Integer, _
ByVal lpFileName As String) As Integer
DWORD GetPrivateProfileSectionNames(
LPTSTR lpszReturnBuffer,
DWORD nSize,
LPCTSTR lpFileName
);
引数
lpszReturnBuffer
(戻り値)セクション名を受けとるバッファnSize
同、サイズ(バイト数)lpFileName
INIファイル名戻り値
正常終了のとき バッファにコピーしたバイト数備考
エラーのとき nSize-2
INIファイルをフルパス名で指定しないときWindowsディレクトリを検索する
lpszReturnBufferの内容は、各セクション名をvbNullCharで区切って
最後尾に二つのvbNullCharがつく。