InstAPI.GetSvcInstanceIDFromName Method

Definition

Retrieves the instance ID of an instance from the given friendly name.

Overloads

GetSvcInstanceIDFromName(String, SQL_SVCS, INST_ID)
Obsolete.

Retrieves the instance ID of an instance from the given friendly name.

GetSvcInstanceIDFromName(String, SQL_SVCS)

Retrieves the instance ID of an instance from the given friendly name.

GetSvcInstanceIDFromName(String, SQL_SVCS, INST_ID)

Caution

This overload is obsolete; use GetSvcInstanceIDFromName(instanceName, service), instead.

Retrieves the instance ID of an instance from the given friendly name.

public:
 static bool GetSvcInstanceIDFromName(System::String ^ instanceName, Microsoft::SqlServer::SQL_SVCS product, Microsoft::SqlServer::INST_ID ^ instanceID);
[System.Obsolete("This overload is obsolete; use GetSvcInstanceIDFromName(instanceName, service), instead.")]
public static bool GetSvcInstanceIDFromName (string instanceName, Microsoft.SqlServer.SQL_SVCS product, Microsoft.SqlServer.INST_ID instanceID);
[<System.Obsolete("This overload is obsolete; use GetSvcInstanceIDFromName(instanceName, service), instead.")>]
static member GetSvcInstanceIDFromName : string * Microsoft.SqlServer.SQL_SVCS * Microsoft.SqlServer.INST_ID -> bool
Public Shared Function GetSvcInstanceIDFromName (instanceName As String, product As SQL_SVCS, instanceID As INST_ID) As Boolean

Parameters

instanceName
String

A String value that represents the instance name.

product
SQL_SVCS

The SQL service.

instanceID
INST_ID

A pointer to a buffer to receive the instance ID.

Returns

true if the call succeeded; otherwise, false.

Attributes

Applies to

GetSvcInstanceIDFromName(String, SQL_SVCS)

Retrieves the instance ID of an instance from the given friendly name.

public:
 static Microsoft::SqlServer::INST_ID ^ GetSvcInstanceIDFromName(System::String ^ instanceName, Microsoft::SqlServer::SQL_SVCS product);
public static Microsoft.SqlServer.INST_ID GetSvcInstanceIDFromName (string instanceName, Microsoft.SqlServer.SQL_SVCS product);
static member GetSvcInstanceIDFromName : string * Microsoft.SqlServer.SQL_SVCS -> Microsoft.SqlServer.INST_ID
Public Shared Function GetSvcInstanceIDFromName (instanceName As String, product As SQL_SVCS) As INST_ID

Parameters

instanceName
String

A String value that represents the instance name.

product
SQL_SVCS

The SQL service.

Returns

The instance ID of an instance from the given friendly name.

Applies to