InstAPI.GetSvcInstRootDirPathByName(String, SQL_SVCS, StringBuilder, UInt32) Method

Definition

根据给定的友好实例名称检索特定 SQL 实例的目录路径根目录。Retrieves the directory path root for a specific SQL instance by the given friendly instance name.

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

Parameters

instanceName
String

一个表示实例名称的 String 值。A String value that represents the instance name.

product
SQL_SVCS

SQL 服务。The SQL service.

directoryPath
StringBuilder

一个指向用于接收路径的缓冲区的指针。A pointer to a buffer to receive the path.

bufferSize
UInt32

一个指向用于提供缓冲区长度的 DWORD 值的指针。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

Boolean

如果调用成功,则为 true;否则为 falsetrue if the call succeeded; otherwise, false.

Applies to