zoukankan      html  css  js  c++  java
  • 调用INI文件

    Public Function IniFileRead(ByVal vstrINIPath As String, vstrINIFileName As String, _
        ByVal vstrINIType As String, ByRef vstrVar As String, ByVal vstrName As String) As Boolean
       
        On Error GoTo errHandler
        Dim lResult As Long
        Dim sTemp As String
        Dim lDB As Long
        Dim msIniFileFullPath As String
       
        IniFileRead = False
       
        msIniFileFullPath = vstrINIPath & "\" & vstrINIFileName

        'get connection string
        sTemp = Space$(300)
        lResult = GetPrivateProfileString(vstrINIType, _
                                          vstrName, _
                                          "", _
                                          sTemp, _
                                          300, _
                                          msIniFileFullPath)
       
        If lResult < 1 Or lResult > 300 Then
            GoTo errHandler
        Else
            sTemp = Left(sTemp, lResult)
        End If
        vstrVar = sTemp
       
        IniFileRead = True
       
        Exit Function
    errHandler:
        IniFileRead = False
       
    End Function

  • 相关阅读:
    iaf——接口自动化测试框架
    性能优化系列
    MVC架构简介及其测试策略
    10种常见的软件架构模式
    软件开发框架分析和架构模式
    安全测试基础&安全测试---AppScan扫描工具
    WEB安全测试要点总结
    大数据Hadoop Hive HBase Spark Storm
    第三方授权方式1
    java-weixin-tools接入微信
  • 原文地址:https://www.cnblogs.com/kentyshang/p/440532.html
Copyright © 2011-2022 走看看