InstAPI.GetSvcBinPathByID(INST_ID, SQL_SVCS, StringBuilder, UInt32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the program file root directory for a specific service by the given service type and the instance ID.
public:
static bool GetSvcBinPathByID(Microsoft::SqlServer::INST_ID ^ instanceID, Microsoft::SqlServer::SQL_SVCS product, System::Text::StringBuilder ^ directoryPath, System::UInt32 % bufferSize);
public static bool GetSvcBinPathByID (Microsoft.SqlServer.INST_ID instanceID, Microsoft.SqlServer.SQL_SVCS product, System.Text.StringBuilder directoryPath, ref uint bufferSize);
static member GetSvcBinPathByID : Microsoft.SqlServer.INST_ID * Microsoft.SqlServer.SQL_SVCS * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetSvcBinPathByID (instanceID As INST_ID, product As SQL_SVCS, directoryPath As StringBuilder, ByRef bufferSize As UInteger) As Boolean
Parameters
- instanceID
- INST_ID
A pointer to the instance ID of the relevant instance.
- product
- SQL_SVCS
The SQL service.
- directoryPath
- StringBuilder
A pointer to a buffer to receive the path.
- bufferSize
- UInt32
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
true
if the call succeeded; otherwise, false
.