语言

InstAPI.GetSQLToolsDirPath(StringBuilder, UInt32) 方法

定义

获取 SQL Server 工具安装的目录根。

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

参数

directoryPath
StringBuilder

指向缓冲区以接收注册表路径的指针。

bufferSize
UInt32

一个指向DWORD值的指针,用于提供缓冲区的长度。 如果缓冲区太小,则返回所需长度。

返回

如果调用成功,则返回 TRUE;如果调用失败,则返回FALSE。

注解

请注意,每个SQL Server版本只有一个工具安装,而不是每个实例安装一个工具。

适用于