InstAPI.GetSQLDataRootByInstName(String, StringBuilder, UInt32) 方法

定義

透過給定的友善實例名稱取得 SQL 資料檔案根目錄。

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

參數

instanceName
String

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

directoryPath
StringBuilder

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

bufferSize
UInt32

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

傳回

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

適用於