WritePrivateProfileString

Writes a specified setting to the project viewer initialization file, using the standard .ini format.

Function Group Execution Windows Embedded Thin Client Mobile Access
WritePrivateProfileString System Info Synchronous Supported Supported Supported Supported

Syntax

  WritePrivateProfileString ( strSection, strName, strValue, strFileName )  
strSection
The section name to be written.
strName
The parameter name to be written.
strValue
The value to be written.
strFileName
The path and name of the .ini file to be written.

Returned value

The function returns 1 if the file was updated successfully.

Notes

When running on Windows Embedded this function will rewrite the entire file, therefore its use is not recommended for lengthy files on Windows Embedded devices. The function will also add the following lines at the end of the file when on a Windows Embedded device:
  [FileBackUpControl]  Valid=1  

Examples

Tag Name Expression
Tag WritePrivateProfileString( Section, Name, Value, FileName )
Tag WritePrivateProfileString( “Options”, “ds1″, “Value”, “C:Viewer.ini” )

WritePrivateProfileString