LocalDBShareInstance Function

Shares the specified SQL Server Express LocalDB instance with other users of the computer, using the specified shared name.

Header file: sqlncli.h

Syntax

HRESULT LocalDBShareInstance(
           PSID pOwnerSID,
           PCWSTR pInstancePrivateName,
           PCWSTR pInstanceSharedName, 
           DWORD dwFlags 
);

Parameters

  • pOwnerSID
    [Input] The SID of the instance owner.

  • pInstancePrivateName
    [Input] The private name for the LocalDB instance to share.

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

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

Returns

Remarks

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

See Also

Concepts

SQL Server Express LocalDB Header and Version Information