ProfileGetValue(DeviceTypes, String, String, String, String) Method

Reads a value from the given sub-key in the device's registry Profile.

Definition

Namespace: ASCOM.Com
Assembly: ASCOM.Com (in ASCOM.Com.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static string GetValue(
	DeviceTypes deviceType,
	string progId,
	string valueName,
	string defaultValue,
	string subKey
)

Parameters

deviceType  DeviceTypes
Device type e.g. Telescope.
progId  String
COM ProgID of the device.
valueName  String
Name of this parameter.
defaultValue  String
If the requested value does not exist, this value will be written to the profile and returned to the caller. Use null to indicate that there is no default value
subKey  String
Name of the sub-key under which to read this value. Use null or empty string to write to the device's profile root.

Return Value

String
String value of the specified parameter.

Exceptions

InvalidValueExceptionIf the ASCOM device type or COM progId are null, empty or just contain white space.
InvalidValueExceptionIf the device is not registered or is not a valid ASCOM device type.
ValueNotSetExceptionThe requested parameter has not been set and the supplied default value is null.

Version Information

.NET Standard

Supported in: 2.0

See Also