语言

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

适用于