📄 getprofilesection.bas
字号:
Attribute VB_Name = "GetProfileSectionModule"
Option Explicit
Declare Function GetProfileSection Lib "kernel32" Alias "GetProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
Sub Main()
Dim S As String, pos As Integer, count As Integer
S = String(32767, 0)
GetProfileSection "windows", S, Len(S)
pos = InStr(S, Chr(0))
While pos > 1
count = count + 1
MsgBox Left(S, pos - 1), , "GetProfileSection"
S = Mid(S, pos + 1)
pos = InStr(S, Chr(0))
Wend
MsgBox "[windows]含有 " & count & "个Key"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -