Em Andamento

Read Settings from INI Configuration file [url removed, login to view]

I use this to read .INI settings file:

Private Function Function GetPrivateProfileStringA lib "kernel32" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As [url removed, login to view], ByVal nSize As UInteger, ByVal lpFileName As String) As UInteger

Private Function GetPrivateProfileIntAParameters lib "kernel32" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As UInteger

Private Function ReadSettings(ByVal key As String, ByVal weaponstr As String, Optional ByVal section As String = Nothing) As UInteger

Try

If [url removed, login to view](SettingsDirPath & "\[url removed, login to view]").Contains("[" & section & "]") Then

Return GetPrivateProfileIntA(section, key, 0, SettingsDirPath & "\[url removed, login to view]")

Else

Return GetPrivateProfileIntA(weaponstr, key, 0, SettingsDirPath & "\[url removed, login to view]")

End If

Catch ex As Exception

Return Nothing

End Try

End Function

Private Function ReadSettingsStr(ByVal key As String, Optional ByVal section As String = Nothing) As String

Try

Dim retVal As New [url removed, login to view](4096)

GetPrivateProfileStringA(section, key, "", retVal, 4096, SettingsDirPath & "\[url removed, login to view]")

Return [url removed, login to view]

Catch ex As Exception

Return Nothing

End Try

End Function

Problem is it doesn't work as the INI file in Windows systems will sometime automatically swap it to be UTF8 encoded and not ANSI

I want it remade to work with UTF8 encoded settings file.

Habilidades: Programação C++ , VB.NET, Windows API

Ver mais: vb work, vb this, string cplusplus, cplusplus string, net private key, file systems, ini read file functions, configuration ini, ini file read, ini file, read ansi file, private vb, catalina log file configuration, muonline server file configuration, ddos deflate configuration settings, read file utf8, net end file, programming read text file, iis configuration settings asp, programming read file

Acerca do Empregador:
( 10 comentários ) Copenhagen, Denmark

ID do Projeto: #6809411

Premiar a:

igotmail9

Dear Sponsor, I am a hard core developer with 14 years of experience in software development with Java (3Y), C++ (10Y), C#(3Y), Visual Basic, Excel, VBA programming, Web programming, HTML5, PHP, MySQL, Linux and Win Mais

$35 USD em 2 dias
(1 Comentário)
0.2