------------------------------[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

全站熱搜
創作者介紹
創作者 M 的頭像
M

M的部落格

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