Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
WriteProfileString (kernel32)
.
VB.NET Signature:
<DllImport("kernel32.dll")> _
Private Shared Function WriteProfileString(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpString As String) As Boolean
End Function
Public Function SetProfileString(ByVal filename As String, ByVal section As String, ByVal key As String, ByVal sValue As String) As Boolean
Dim bRslt As Boolean
If filename = "" Then
bRslt = WriteProfileString(section, key, sValue)
Else
bRslt = WritePrivateProfileString(section, key, sValue, filename)
End If
Return bRslt
End Function
Public Function SetProfileString(ByVal section As String, ByVal key As String, ByVal sValue As String) As Boolean
Return SetProfileString("", section, key, sValue)
End Function
7/11/2012 10:55:32 AM - tl9@trustmarkins.com-24.14.70.138
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).