>>685 Windows APIを調べて書き直して、動作確認してみた 色々と勘違いと間違いがあったので動いたコード載せておくよ
#Include "windows.bi"
Const StrLength As Long = 5120
Dim IniFile As String = ExePath + "/VB.ini" Dim strValue As ZString*StrLength Dim strValuePtr As ZString Ptr = @strValue Dim strValueSize As Long = GetPrivateProfileSectionNames(strValuePtr, StrLength, IniFile)
If (strValueSize + 2) = StrLength Then End ' この判定はもっと良い方法があるはず
Dim count As Integer Dim Zcount As Integer
While count < strValueSize Dim tmp As String = *strValuePtr Dim length As Integer = Len(tmp) + 1 count += length strValuePtr += length Zcount += 1 Print tmp If Zcount > 1000 Then Exit While Wend