|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#If Win16 Then Declare Function WritePrivateProfileString Lib "Kernel" (ByVal AppName As String, ByVal keyname As String, ByVal NewString As String, ByVal FileName As String) As Integer Declare Function GetPrivateProfileString Lib "Kernel" Alias "GetPrivateProfilestring" (ByVal AppName As String, ByVal keyname As Any, ByVal default As String, ByVal ReturnedString As String, ByVal MAXSIZE As Integer, ByVal FileName As String) As Integer Declare Function ShellExecute Lib "shell.dll" (ByVal hwnd As Integer, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Integer) As Integer #Else Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As Any, ByVal lpFileName As String) As Long Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long #End If Function ReadINI(ByVal section, keyname, FileNaam, Optional standard As String) As String Dim str As String str = String(100000, Chr(0)) ReadINI = Left(str, GetPrivateProfileString(section, ByVal keyname, standard, str, Len(str), FileNaam)) End Function Function WriteINI(ByVal sSection As String, ByVal sKeyName As String, ByVal sNewString As String, ByVal sFileNaam As String) As Integer WritePrivateProfileString sSection, sKeyName, sNewString, sFileNaam End Function |
Date of registration: Jul 16th 2008
Location: Erlangen, Germany
Occupation: Software Developer
Hobbies: Jabaco, game theory, text-mining
I noticed your good suggestion. We should improve the API-support. JNA is a possible way - I'm not sure with the LGPL license and the size of JNA...
Quoted
Hope Manuel will read this![]()
I noticed your good suggestion. We should improve the API-support. JNA is a possible way - I'm not sure with the LGPL license and the size of JNA...
Quoted
Hope Manuel will read this![]()
