InstAPI.GetInstanceNameFromService(String, StringBuilder, UInt32) Method

Definition

Retrieves the instance name from a service.

public:
 static bool GetInstanceNameFromService(System::String ^ serviceName, System::Text::StringBuilder ^ instanceName, System::UInt32 % bufferSize);
public static bool GetInstanceNameFromService (string serviceName, System.Text.StringBuilder instanceName, ref uint bufferSize);
static member GetInstanceNameFromService : string * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetInstanceNameFromService (serviceName As String, instanceName As StringBuilder, ByRef bufferSize As UInteger) As Boolean

Parameters

serviceName
String

A String value that contains the name of the service.

instanceName
StringBuilder

A StringBuilder value that represents the instance name using the StringBuilder.

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.

Applies to