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

  • 相关阅读:
    ssi服务器端指令
    json格式的转换为json字符串函数
    接口测试基础和jmeter
    【JZOJ6274】梦境
    【JZOJ6275】小L的数列
    【luoguP4721】分治 FFT
    【luoguP3868】猜数字
    中国剩余定理与扩展中国剩余定理
    【JZOJ6277】矩阵游戏
    【JZOJ6271】锻造 (forging)
  • 原文地址:https://www.cnblogs.com/kentyshang/p/440532.html
Copyright © 2011-2022 走看看