📄 writeprofilesection.bas
字号:
Attribute VB_Name = "WriteProfileSectionModule"
Option Explicit
'写Win.ini文件
Declare Function WriteProfileSection Lib "kernel32" Alias "WriteProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String) As Long
Sub Main()
Dim S As String, Success As Boolean
S = "Key1=Value1" & Chr(0) & _
"Key2=Value2" & Chr(0) & _
"Key3=Value3" & Chr(0) & Chr(0)
Success = WriteProfileSection("ProfileTest", S)
If Success Then
MsgBox "写入成功!"
Else
MsgBox "写入失败!"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -