InstAPI.GetInstanceNameFromID Method

Definition

Retrieves an instance name from an ID.

Overloads

GetInstanceNameFromID(INST_ID)

Retrieves an instance name from an ID.

GetInstanceNameFromID(INST_ID, StringBuilder, UInt32)
Obsolete.

Retrieves an instance name from an ID.

GetInstanceNameFromID(INST_ID)

Retrieves an instance name from an ID.

public:
 static System::String ^ GetInstanceNameFromID(Microsoft::SqlServer::INST_ID ^ instanceID);
public static string GetInstanceNameFromID (Microsoft.SqlServer.INST_ID instanceID);
static member GetInstanceNameFromID : Microsoft.SqlServer.INST_ID -> string
Public Shared Function GetInstanceNameFromID (instanceID As INST_ID) As String

Parameters

instanceID
INST_ID

The instance ID to use.

Returns

The instance name from an ID.

Applies to

GetInstanceNameFromID(INST_ID, StringBuilder, UInt32)

Caution

This overload is obsolete; use GetInstanceNameFromID(instanceID), instead.

Retrieves an instance name from an ID.

public:
 static bool GetInstanceNameFromID(Microsoft::SqlServer::INST_ID ^ instanceID, System::Text::StringBuilder ^ instanceName, System::UInt32 % bufferSize);
[System.Obsolete("This overload is obsolete; use GetInstanceNameFromID(instanceID), instead.")]
public static bool GetInstanceNameFromID (Microsoft.SqlServer.INST_ID instanceID, System.Text.StringBuilder instanceName, ref uint bufferSize);
[<System.Obsolete("This overload is obsolete; use GetInstanceNameFromID(instanceID), instead.")>]
static member GetInstanceNameFromID : Microsoft.SqlServer.INST_ID * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetInstanceNameFromID (instanceID As INST_ID, instanceName As StringBuilder, ByRef bufferSize As UInteger) As Boolean

Parameters

instanceID
INST_ID

The instance ID to use.

instanceName
StringBuilder

A string value that represents the instance name.

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 an instance name is retrieved; otherwise, false.

Attributes

Applies to