InstAPI.GetSvcInstRootRegPathByName Method

Definition

Retrieves the registry path root for a specific SQL instance by the given friendly instance name.

public:
 static bool GetSvcInstRootRegPathByName(System::String ^ instanceName, Microsoft::SqlServer::SQL_SVCS product, System::Text::StringBuilder ^ registryPath, System::UInt32 % bufferSize);
public static bool GetSvcInstRootRegPathByName (string instanceName, Microsoft.SqlServer.SQL_SVCS product, System.Text.StringBuilder registryPath, ref uint bufferSize);
static member GetSvcInstRootRegPathByName : string * Microsoft.SqlServer.SQL_SVCS * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetSvcInstRootRegPathByName (instanceName As String, product As SQL_SVCS, registryPath 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
StringBuilder

A pointer to a buffer to receive the registry path.

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