<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0" />

Interop.Windows.Sni.ISniNativeMethods

interface ISniNativeMethods
uint SniAddProvider(SNIHandle pConn, Provider provider, ref AuthProviderInfo pInfo)

uint SniAddProvider(SNIHandle pConn, Provider provider, ref uint pInfo)

uint SniClose(IntPtr pConn)

uint SniGetInfoWrapper(SNIHandle pConn, QueryType queryType, out bool pbQueryInfo)

uint SniGetInfoWrapper(SNIHandle pConn, QueryType queryType, out Guid pbQueryInfo)

uint SniGetInfoWrapper(SNIHandle pConn, QueryType queryType, out Provider provider)

uint SniGetInfoWrapper(SNIHandle pConn, QueryType queryType, out ushort portNumber)

void SniGetLastError(out SniError pLastError)

uint SniGetPeerAddrStrWrapper(SNIHandle pConn, int bufferSize, StringBuilder addrBuffer, out uint addrLength)

uint SniInitialize(IntPtr pmo)

uint SniIsTokenRestricted(IntPtr token, out bool isRestricted)

uint SniOpenSyncExWrapper(ref SniClientConsumerInfo pClientConsumerInfo, out IntPtr ppConn)

uint SniOpenWrapper(ref SniConsumerInfo pConsumerInfo, string connect, SNIHandle pConn, out IntPtr ppConn, bool fSync, SqlConnectionIPAddressPreference ipPreference, ref SniDnsCacheInfo pDnsCacheInfo)

uint SniPacketGetDataWrapper(IntPtr packet, byte[] readBuffer, uint readBufferLength, out uint dataSize)

void SniPacketRelease(IntPtr pPacket)

void SniPacketReset(SNIHandle pConn, IoType ioType, SNIPacket pPacket, ConsumerNumber consumer)

void SniPacketSetData(SNIPacket pPacket, Byte* pbBuffer, uint cbBuffer)

uint SniQueryInfo(QueryType queryType, ref IntPtr pbQueryInfo)

uint SniQueryInfo(QueryType queryType, ref uint pbQueryInfo)

uint SniReadAsync(SNIHandle pConn, ref IntPtr ppNewPacket)

uint SniReadSyncOverAsync(SNIHandle pConn, ref IntPtr ppNewPacket, int timeout)

uint SniRemoveProvider(SNIHandle pConn, Provider provider)

uint SniSecGenClientContextWrapper(SNIHandle pConn, Byte* pIn, uint cbIn, Byte* pOut, ref uint pcbOut, out bool pfDone, Byte* szServerInfo, uint cbServerInfo, string pwszUserName, string pwszPassword)

uint SniSecInitPackage(ref uint pcbMaxToken)

void SniServerEnumClose(IntPtr packet)

int SniServerEnumRead(IntPtr packet, char[] readBuffer, int bufferLength, out bool more)

uint SniSetInfo(SNIHandle pConn, QueryType queryType, ref uint pbQueryInfo)

uint SniTerminate()

uint SniWaitForSslHandshakeToComplete(SNIHandle pConn, int dwMilliseconds, out SniSslProtocols pProtocolVersion)