InstAPI.GetSvcInstanceRegStringByName Method

Definition

Retrieves a registry string from an instance specific registry tree by the given friendly instance name, subtree, and the value name.

public:
 static bool GetSvcInstanceRegStringByName(System::String ^ instanceName, Microsoft::SqlServer::SQL_SVCS product, System::String ^ registryPath, System::String ^ valueName, System::Text::StringBuilder ^ data, System::UInt32 % bufferSize);
public static bool GetSvcInstanceRegStringByName (string instanceName, Microsoft.SqlServer.SQL_SVCS product, string registryPath, string valueName, System.Text.StringBuilder data, ref uint bufferSize);
static member GetSvcInstanceRegStringByName : string * Microsoft.SqlServer.SQL_SVCS * string * string * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetSvcInstanceRegStringByName (instanceName As String, product As SQL_SVCS, registryPath As String, valueName As String, data As StringBuilder, ByRef bufferSize As UInteger) As Boolean

Parameters

instanceName
String

A String value that represents the instance name.

product
SQL_SVCS

The SQL service.

registryPath
String

A pointer to a buffer to receive the registry path.

valueName
String

A string that contains the value name to retrieve.

data
StringBuilder

A pointer to a buffer to receive the string that will be retrieved.

bufferSize
UInt32

A pointer to a DWORD value to supply the length of the buffer. Returns the required length if the supplied buffer is too small.

Returns

true if the call succeeded; otherwise, false.

Applies to