ini file:
Function WritePrivateString()
Dim Section As String
Dim KeyName As String
Dim Value As String
978
Professional Database Development Part IV
Dim FileName As String
Dim ErrNumber As Long
Dim Setting As Long
Dim PathName As String
Dim lenPath As Integer
Dim IniPath As String
???Call the GetCommandLine wrapper function:
PathName = GetCommandLine()
lenPath = Len(PathName)
lenPath = lenPath - 15
IniPath = Left$(PathName, lenPath)
IniPath = Right$(IniPath, Len(IniPath) - 1)
filename = IniPath & ???TEST.INI???
Section = ???Settings???
Setting = GetTitleSetting()
Select Case Setting
Case 1
KeyName = ???AppTitle???
Value = ???Microsoft Access - ??? & GetUser()
ErrNumber = apiWritePrivateProfileString( _
Section, KeyName, Value, FileName)
Value = ???2???
KeyName = ???TitleBar???
ErrNumber = apiWritePrivateProfileString( _
Section, KeyName, Value, FileName)
Case 2
KeyName = ???AppTitle???
Value = ???My Access Application???
ErrNumber = apiWritePrivateProfileString(_
Section, KeyName, Value, FileName)
KeyName = ???TitleBar???
Value = ???1???
ErrNumber = apiWritePrivateProfileString(_
Section, KeyName, Value, FileName)
Case Else
End Select
End Function
WriteProfileStringA
WriteProfileStringA behaves much like WritePrivateProfileStringA, except it does
not accept a filename as a parameter:
Declare Function apiWriteProfileString _
Lib ???Kernel32??? _
Alias ???WriteProfileStringA???( _
979
Using the Windows API 30
ByVal lpszSection As String, _
ByVal lpszKey As String, _
ByVal lpszSetting As String) As Long
Like GetProfileStringA, this function only works on the win.
Pages:
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841