------------------------------[VBA程式碼]---------------------------------

Private 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

 

'讀取INI檔

Dim ret As Long

Dim buff As String

buff = String(255, 0)

ret = GetPrivateProfileString("SQLConnection", "PWD", "", buff, 256, Path & "initial.ini")

sL_str = buff

 

------------------------------[INI檔內容格式]---------------------------------

[SQLConnection]

PWD=SUlkZXZlbG9wMDE

arrow
arrow
    全站熱搜

    M 發表在 痞客邦 留言(0) 人氣()