InstAPI.GetSvcInstanceRegStringByName 方法

定義

從實例特定的登錄樹中,透過給定的友善實例名稱、子樹和值名稱,取得一個登錄檔字串。

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

參數

instanceName
String

一個 String 代表實例名稱的值。

product
SQL_SVCS

SQL 服務。

registryPath
String

一個指向緩衝區的指標,用來接收登錄檔路徑。

valueName
String

一個包含要取回值名稱的字串。

data
StringBuilder

一個指向緩衝區的指標,用來接收將要被檢索的字串。

bufferSize
UInt32

一個指向 DWORD 值的指標,用以提供緩衝區的長度。 若緩衝區太小,則回傳所需長度。

傳回

true若呼叫成功;否則,。 false

適用於