API 读写配置文件
来源:互联网 发布:土豆双十一 淘宝 编辑:程序博客网 时间:2024/05/06 00:19
模块中声明API函数:
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As LongPublic Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
窗体中读写配置文件:
Private Sub Form_Load() Dim ret As Long Dim buff As String buff = String(255, 0) ret = GetPrivateProfileString("配置信息", "Name", "", buff, 256, App.Path & "\Set.ini") Text1.Text = buffEnd SubPrivate Sub Form_Unload(Cancel As Integer) '当程序退出时保存Text里面的内容到当前目录set.ini里 Dim a As Long a = WritePrivateProfileString("配置信息", "Name", Text1.Text, App.Path & "\Set.ini")End Sub
- API 读写配置文件
- C# API读写ini配置文件
- 使用win api 读写 ini配置文件
- 配置文件键值对读写API函数实现
- 调用API函数读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 配置文件读写
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 读写配置文件
- 配置文件API
- 单播,多播,广播解释
- TCP/IP详解--第九章
- 关于AWR报告中一些参数的解释
- ADO.NET
- 精简jre
- API 读写配置文件
- java基础第21天
- Android系统架构基本模式解析
- TCP/IP详解--第十章
- CF 213E Two Permutations(线段树,hash)
- 【Android】在Eclipse下搭建Android开发环境教程
- putty详细使用说明
- MySQL 数据类型 详解
- TCP/IP详解--第十一章