GetPrivateProfileSectionNames

機能
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がつく。