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

  • 相关阅读:
    C语言32个关键字详解
    C语言格式控制符
    c++关键字详解
    多码流简介
    Jtag管脚定义
    关于RGB信号的电平
    缩略语MSPS
    【转】松下18650的容量判别方法
    电信号在FR4材料中的传播速度
    dropout voltage
  • 原文地址:https://www.cnblogs.com/kentyshang/p/440532.html
Copyright © 2011-2022 走看看