Desktop Functions: Smart Device Functions:
|
WritePrivateProfileString (kernel32)
C# Signature:
[DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)] VB.NET Signature:
<DllImport("kernel32.dll", SetLastError:=True)> _ VB.NET Alternative Signature:
<DllImport("kernel32.dll", SetLastError:=True)> _ C++ Signature:
[DllImport("KERNEL32.DLL", CharSet=CharSet::Auto, EntryPoint="WritePrivateProfileString")] User-Defined Types:None. Notes:If StringToWrite is NULL, the line indicated by SectionName and KeyName will be deleted. If KeyName is NULL, the entire section indicated by SectionName and all keys and values therein will be deleted. Tips & Tricks:Please add some! Sample Code:C# Sample: bool WriteINI(string SectionName, string KeyName, string StringToWrite, string INIFileName) {
bool Return; } VB.NET Sample
Dim bres As Boolean VB.NET Alternative Sample
Public Function WriteIni(ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFilename As String) As Boolean PowerShell Sample
http://gallery.technet.microsoft.com/scriptcenter/Edit-old-fashioned-INI-f8fbc067 Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
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). |
|