欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
ini文件讀寫(xiě)模塊(可以窮舉一個(gè)ini文件里的所有段名和指定段的鍵名/鍵值)
 
Attribute VB_Name = "mIni"'*************************************************************************'**模 塊 名:mIni'**說(shuō)    明:孤帆 版權所有2005 - 2006(C)'**創(chuàng  ) 建 人:孤帆'**日    期:2005-5-25 13:16:33'**描    述:讀寫(xiě)ini文件鍵值/段值模塊(可以窮舉一個(gè)ini文件里的所有段名'**          和指定段的鍵名/鍵值)'**版    本:V1.0.0'*************************************************************************Option Base 0Private Declare Function GetPrivateProfileIntA Lib "kernel32" (ByVal Senction$, ByVal lpKeyName$, ByVal nDefault&, ByVal lpFileName$) As LongPrivate Declare Function GetPrivateProfileSectionNamesA Lib "kernel32.dll" (ByVal szValue$, ByVal nSize&, ByVal szFileName$) As LongPrivate Declare Function WritePrivateProfileSectionA Lib "kernel32" (ByVal Senction$, ByVal szValue$, ByVal szFileName$) As LongPrivate Declare Function GetPrivateProfileSectionA Lib "kernel32" (ByVal Senction$, ByVal szValue As String, ByVal nSize&, ByVal szFileName$) As LongPrivate Declare Function WritePrivateProfileStringA Lib "kernel32" (ByVal Section$, ByVal Key$, ByVal szValue$, ByVal lpFileName$) As LongPrivate Declare Function GetPrivateProfileStringA Lib "kernel32" (ByVal Senction$, ByVal Key As Any, ByVal lpDefault$, _                          ByVal szValue$, ByVal nSize As Long, ByVal szFileName$) As LongPrivate m_Path$'--------------------------------'   一個(gè)ini段中的數據結構'   通過(guò)次結構窮舉指定段里的'       鍵的數據'--------------------------------Public Type TSection    kName As String     '鍵名    kValue As String    '鍵值End Type'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'                                   屬性'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'*************************************************************************'   ini文件路徑屬性'*************************************************************************Public Property Let Path(ByVal szValue$)    m_Path = szValueEnd PropertyPublic Property Get Path() As String    Path = m_PathEnd Property'*************************************************************************'   獲取當前程序文件路徑(后加"/")'*************************************************************************Property Get AppPath() As String    AppPath = App.Path    If Right$(AppPath, 1) <> "/" Then AppPath = AppPath & "/"End Property'*************************************************************************'   鎖定ini文件屬性'   參  數:是否鎖定'*************************************************************************Property Let Locked(ByVal bYes As Boolean)    On Error GoTo Out    If bYes Then        Call SetAttr(m_Path, vbNormal)    Else        Call SetAttr(m_Path, vbHidden Or vbReadOnly Or vbSystem)    End IfOut:End Property'*************************************************************************'   獲取ini文件大小屬性'*************************************************************************Property Get iniSize() As Long    iniSize = FileLen(m_Path)End Property'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'                                   讀寫(xiě)ini鍵值'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'*************************************************************************'   讀取ini段里的字符串鍵值'   參  數:段名,鍵名,鍵值'   返回值:鍵值'*************************************************************************Function getStrKey(ByVal Section$, ByVal KeyName$, Optional ByVal szDefaultValue$ = vbNullString) As String    Dim szBuffer$, nLen%    szBuffer = String$(1024, 0)    nLen = GetPrivateProfileStringA(Section, KeyName, szDefaultValue, szBuffer, 1024, m_Path)    If nLen > 0 Then getStrKey = Left$(szBuffer, nLen)End Function'*************************************************************************'   寫(xiě)ini段里的字符串鍵值'   參  數:段名,鍵名,鍵值'   返回值:成功則為true'*************************************************************************Function setStrKey(ByVal Section$, ByVal KeyName$, Optional ByVal szValue$ = vbNullString) As Boolean    setStrKey = WritePrivateProfileStringA(Section, KeyName, szValue, m_Path)End Function'*************************************************************************'   讀取ini段里的整形鍵值'   參  數:段名,鍵名,鍵值'   返回值:鍵值'*************************************************************************Function getIntKey(ByVal Section$, ByVal KeyName$, Optional DefaultValue& = -1) As Long    getIntKey = GetPrivateProfileIntA(Section, KeyName, DefaultValue, m_Path)End Function'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'                                   讀寫(xiě)ini段值'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'*************************************************************************'   讀取ini段里的所有字符串到一個(gè)TSection結構的數組里' 參  數:段名,提供返回段中字符串的動(dòng)態(tài)TSection數組'   返回值:成功則返回數組下限,否則返回-1'*************************************************************************Function getStrSection2Structs(ByVal Section$, rSection() As TSection) As Long    Dim strTmp() As String, strTmp2() As String, szBuffer$    Dim nLen%, I%, Bottom%    szBuffer = String$(32767, 0)    nLen = GetPrivateProfileSectionA(Section, szBuffer, 32767, m_Path)    If nLen > 0 Then        On Error GoTo Out        szBuffer = Left$(szBuffer, nLen)        Tmp2 = Split(szBuffer, vbNullChar, nLen) '分解出每一個(gè)鍵的數據        Bottom = UBound(Tmp2) - 1        ReDim rSection(Bottom)        For I = 0 To Bottom            Tmp = Split(Tmp2(I), "=")           '分解鍵名和鍵值            rSection(I).kName = Tmp(0)            rSection(I).kValue = Tmp(1)        Next        getStrSection2Structs = Bottom    Else        getStrSection2Structs = -1    End IfOut:End Function'*************************************************************************'   讀取ini段里的所有字符串' 參  數:段名,提供返回段中字符串的動(dòng)態(tài)字符串數組(每一行一個(gè)元素)'   返回值:成功則返回數組下限,否則返回-1'*************************************************************************Function getStrSection(ByVal Section$, rValue() As String) As Long    Dim szBuffer$    Dim nLen%, I%, Bottom%    szBuffer = String$(32767, 0)    nLen = GetPrivateProfileSectionA(Section, szBuffer, 32767, m_Path)    If nLen > 0 Then        On Error GoTo Out        szBuffer = Left$(szBuffer, nLen)        rValue = Split(szBuffer, vbNullChar, nLen)        Bottom = UBound(rValue) - 1        getStrSection = Bottom    Else        getStrSection = -1    End IfOut:End Function'*************************************************************************'   寫(xiě)一個(gè)ini段'   參  數:段名,段值(缺省為刪除這個(gè)段,鍵與鍵之間的數據以vbNullChar分隔且以vbNullChar結尾)'   返回值:成功則為true'*************************************************************************Function setStrSection(ByVal Section$, Optional ByVal szValue$ = vbNullString) As Boolean    setStrSection = WritePrivateProfileSectionA(Section, szValue, m_Path)End Function'*************************************************************************'   讀取ini文件里的所有段名'   參  數:提供返回段名的動(dòng)態(tài)字符串數組'   返回值:成功則返回數組下限,否則返回-1'*************************************************************************Function getSectionsName(rSectionName() As String) As Long    Dim szBuffer$, nLen%    szBuffer = String(1024, 0)    nLen = GetPrivateProfileSectionNamesA(szBuffer, 1024, m_Path)    If nLen = 0 Then        getSectionsName = -1        Exit Function    End If    If nLen > 0 Then        szBuffer = Left$(szBuffer, nLen)        On Error GoTo Out        rSectionName = Split(szBuffer, vbNullChar, nLen)        getSectionsName = UBound(rSectionName) - 1    End IfOut:End Function
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
VB中如何改變文件關(guān)聯(lián)!
vb 讀寫(xiě)ini文件
Cookie操作公共方法類(lèi)-程序開(kāi)發(fā)-紅黑聯(lián)盟
109.取得臨時(shí)文件名
VC VB 操作注冊表API
超精簡(jiǎn)加封裝的VB注冊表讀寫(xiě)刪改操作代碼
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久