InstAPI.GetSQLServiceByID(INST_ID, SQL_SVCS, StringBuilder, UInt32) Method

Definition

Uses a Boolean expression to sort SQL Service by specified ID.

public:
 static bool GetSQLServiceByID(Microsoft::SqlServer::INST_ID ^ instanceID, Microsoft::SqlServer::SQL_SVCS product, System::Text::StringBuilder ^ serviceName, System::UInt32 % bufferSize);
public static bool GetSQLServiceByID (Microsoft.SqlServer.INST_ID instanceID, Microsoft.SqlServer.SQL_SVCS product, System.Text.StringBuilder serviceName, ref uint bufferSize);
static member GetSQLServiceByID : Microsoft.SqlServer.INST_ID * Microsoft.SqlServer.SQL_SVCS * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetSQLServiceByID (instanceID As INST_ID, product As SQL_SVCS, serviceName As StringBuilder, ByRef bufferSize As UInteger) As Boolean

Parameters

instanceID
INST_ID

A specified value for instance ID.

product
SQL_SVCS

The SQL service.

serviceName
StringBuilder

A string input for ServiceName.

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 SQL Service is sorted by ID; otherwise, false.

Applies to