Writes a string value to the profile using the supplied subkey for the given Driver ID and variable name.

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public void WriteValue(
	string DriverID,
	string Name,
	string Value,
	string SubKey
)
Visual Basic
Public Sub WriteValue ( _
	DriverID As String, _
	Name As String, _
	Value As String, _
	SubKey As String _
)
Visual C++
public:
virtual void WriteValue(
	String^ DriverID, 
	String^ Name, 
	String^ Value, 
	String^ SubKey
) sealed

Parameters

DriverID
Type: System..::..String
ProgID of the device to read from
Name
Type: System..::..String
Name of the variable whose value is retrieved
Value
Type: System..::..String
The string value to be written
SubKey
Type: System..::..String
Subkey from the profile root in which to write the value

Implements

IProfile..::..WriteValue(String, String, String, String)

Remarks

Exceptions

ExceptionCondition
ASCOM.Utilities.Exceptions..::..InvalidValueExceptionThrown if DriverID is an empty string.
ASCOM.Utilities.Exceptions..::..DriverNotRegisteredExceptionThrown if the driver is not registered,
ASCOM.Utilities.Exceptions..::..RestrictedAccessExceptionThrown if Name and SubKey are both empty strings. This value is reserved for the device description as it appears in Chooser and is set by Profile.Register

See Also