⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inimodule.bas

📁 由VB编写的一个实用短信计费系统。主要模块包括(1)计费管理子系统:用户入费;错单处理;用户费率管理;费率管理;用户分析(2)系统维护子系统:管理员登录、管理员管理、数据库设置等(3)计费引擎子系统
💻 BAS
字号:
Attribute VB_Name = "IniModule"
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 Long
Public 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

'读INI文件
Public Function ReadIni(ByVal AppName As String, ByVal KeyName As String, ByVal FileName As String) As String

    Dim ret As Long
    Dim buff As String
    buff = Space(255)
    ret = GetPrivateProfileString(AppName, KeyName, "", buff, 256, FileName)
    ReadIni = Trim(buff)

End Function

'写INI文件
Public Function WriteIni(ByVal AppName As String, ByVal KeyName As String, ByVal strValue As String, ByVal FileName As String) As Long

    Dim ret As Long
    Dim buff As String

    buff = strValue
    ret = WritePrivateProfileString(AppName, KeyName, buff, FileName)
    WriteIni = ret

End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -