Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 2.54 KB

File metadata and controls

69 lines (53 loc) · 2.54 KB
title LocalDBUnshareInstance Function | Microsoft Docs
ms.custom
ms.date 03/03/2017
ms.prod sql
ms.prod_service database-engine
ms.reviewer
ms.technology
ms.topic reference
apiname
LocalDBUnshareInstance
apilocation
sqluserinstance.dll
apitype DLLExport
ms.assetid 54012ccb-eded-43f7-8ea5-da5ce79224c6
author CarlRabeler
ms.author carlrab

LocalDBUnshareInstance Function

[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md] Stops the sharing of the specified SQL Server Express LocalDB instance.

Header file: sqlncli.h

Syntax

HRESULT LocalDBUnShareInstance(  
           PCWSTR pInstanceSharedName,   
           DWORD dwFlags   
);  

Parameters

pInstanceSharedName
[Input] The shared name for the LocalDB instance to unshare.

dwFlags
[Input] Reserved for future use. Currently should be set to 0.

Returns

S_OK
The function succeeded.

LOCALDB_ERROR_NOT_INSTALLED
SQL Server Express LocalDB is not installed on the computer.

LOCALDB_ERROR_INVALID_PARAMETER
One or more specified input parameters are invalid.

LOCALDB_ERROR_INVALID_INSTANCE_NAME
The specified instance name is invalid.

LOCALDB_ERROR_UNKNOWN_INSTANCE
The specified instance does not exist.

LOCALDB_ERROR_ADMIN_RIGHTS_REQUIRED
Administrator privileges are required in order to execute this operation.

LOCALDB_ERROR_INTERNAL_ERROR
An unexpected error occurred. See the event log for details.

Remarks

For a code sample that uses LocalDB API, see SQL Server Express LocalDB Reference.

See Also

SQL Server Express LocalDB Header and Version Information