internal static void SNIPacketReset([In] SNIHandle pConn, IOType IOType, SNIPacket pPacket, ConsumerNumber ConsNum)
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.SNIPacketReset(pConn, IOType, pPacket, ConsNum);
     }
     else
     {
         SNINativeManagedWrapperX86.SNIPacketReset(pConn, IOType, pPacket, ConsNum);
     }
 }
 internal static void SNIGetLastError(out SNI_Error pErrorStruct)
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.SNIGetLastError(out pErrorStruct);
     }
     else
     {
         SNINativeManagedWrapperX86.SNIGetLastError(out pErrorStruct);
     }
 }
 internal static void SNIPacketRelease(IntPtr pPacket)
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.SNIPacketRelease(pPacket);
     }
     else
     {
         SNINativeManagedWrapperX86.SNIPacketRelease(pPacket);
     }
 }
 private static unsafe void SNIPacketSetData(SNIPacket pPacket, [In] byte *pbBuf, uint cbBuf)
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.SNIPacketSetData(pPacket, pbBuf, cbBuf);
     }
     else
     {
         SNINativeManagedWrapperX86.SNIPacketSetData(pPacket, pbBuf, cbBuf);
     }
 }
 internal static void SNIServerEnumClose([In] IntPtr packet)
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.SNIServerEnumClose(packet);
     }
     else
     {
         SNINativeManagedWrapperX86.SNIServerEnumClose(packet);
     }
 }
示例#6
0
 private static uint SNIOpenWrapper(
     [In] ref Sni_Consumer_Info pConsumerInfo,
     [MarshalAs(UnmanagedType.LPWStr)] string szConnect,
     [In] SNIHandle pConn,
     out IntPtr ppConn,
     [MarshalAs(UnmanagedType.Bool)] bool fSync)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync) :
            SNINativeManagedWrapperX86.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync));
 }
 internal static void UnregisterTraceProvider()
 {
     if (s_is64bitProcess)
     {
         SNINativeManagedWrapperX64.UnregisterTraceProviderWrapper();
     }
     else
     {
         SNINativeManagedWrapperX86.UnregisterTraceProviderWrapper();
     }
 }
 private static uint SNIOpenWrapper(
     [In] ref Sni_Consumer_Info pConsumerInfo,
     [MarshalAs(UnmanagedType.LPWStr)] string szConnect,
     [In] SNIHandle pConn,
     out IntPtr ppConn,
     [MarshalAs(UnmanagedType.Bool)] bool fSync,
     SqlConnectionIPAddressPreference ipPreference,
     [In] ref SNI_DNSCache_Info pDNSCachedInfo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo) :
            SNINativeManagedWrapperX86.SNIOpenWrapper(ref pConsumerInfo, szConnect, pConn, out ppConn, fSync, ipPreference, ref pDNSCachedInfo));
 }
 internal static bool RegisterTraceProvider(int eventKeyword)
 {
     // Registers the TraceLogging provider, enabling it to generate events.
     // Return true if enabled, otherwise false.
     if (s_is64bitProcess)
     {
         return(SNINativeManagedWrapperX64.RegisterTraceProviderWrapper(eventKeyword));
     }
     else
     {
         return(SNINativeManagedWrapperX86.RegisterTraceProviderWrapper(eventKeyword));
     }
 }
 private static unsafe uint SNISecGenClientContextWrapper(
     [In] SNIHandle pConn,
     [In, Out] byte[] pIn,
     uint cbIn,
     [In, Out] byte[] pOut,
     [In] ref uint pcbOut,
     [MarshalAsAttribute(UnmanagedType.Bool)] out bool pfDone,
     byte *szServerInfo,
     uint cbServerInfo,
     [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszUserName,
     [MarshalAsAttribute(UnmanagedType.LPWStr)] string pwszPassword)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword) :
            SNINativeManagedWrapperX86.SNISecGenClientContextWrapper(pConn, pIn, cbIn, pOut, ref pcbOut, out pfDone, szServerInfo, cbServerInfo, pwszUserName, pwszPassword));
 }
 private static uint SNIPacketGetDataWrapper([In] IntPtr packet, [In, Out] byte[] readBuffer, uint readBufferLength, out uint dataSize)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize) :
            SNINativeManagedWrapperX86.SNIPacketGetDataWrapper(packet, readBuffer, readBufferLength, out dataSize));
 }
 internal static uint SNIQueryInfo(QTypes QType, ref IntPtr pbQInfo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIQueryInfo(QType, ref pbQInfo) :
            SNINativeManagedWrapperX86.SNIQueryInfo(QType, ref pbQInfo));
 }
 private static IntPtr SNIPacketAllocateWrapper([In] SafeHandle pConn, IOType IOType)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIPacketAllocateWrapper(pConn, IOType) :
            SNINativeManagedWrapperX86.SNIPacketAllocateWrapper(pConn, IOType));
 }
 private static uint SNIInitialize([In] IntPtr pmo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIInitialize(pmo) :
            SNINativeManagedWrapperX86.SNIInitialize(pmo));
 }
 private static uint SNIOpenSyncExWrapper(ref SNI_CLIENT_CONSUMER_INFO pClientConsumerInfo, out IntPtr ppConn)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn) :
            SNINativeManagedWrapperX86.SNIOpenSyncExWrapper(ref pClientConsumerInfo, out ppConn));
 }
 internal static uint SNISecInitPackage(ref uint pcbMaxToken)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNISecInitPackage(ref pcbMaxToken) :
            SNINativeManagedWrapperX86.SNISecInitPackage(ref pcbMaxToken));
 }
 private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, out ProviderEnum provNum)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out provNum) :
            SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out provNum));
 }
 private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, [MarshalAs(UnmanagedType.Bool)] out bool pbQInfo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, out pbQInfo) :
            SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, out pbQInfo));
 }
 private static uint SNIGetInfoWrapper([In] SNIHandle pConn, SNINativeMethodWrapper.QTypes QType, ref IntPtr pbQInfo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIGetInfoWrapper(pConn, QType, ref pbQInfo) :
            SNINativeManagedWrapperX86.SNIGetInfoWrapper(pConn, QType, ref pbQInfo));
 }
 internal static uint SNIReadSyncOverAsync(SNIHandle pConn, ref IntPtr ppNewPacket, int timeout)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout) :
            SNINativeManagedWrapperX86.SNIReadSyncOverAsync(pConn, ref ppNewPacket, timeout));
 }
 private static uint GetSniMaxComposedSpnLength()
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.GetSniMaxComposedSpnLength() :
            SNINativeManagedWrapperX86.GetSniMaxComposedSpnLength());
 }
 private static uint SNIWriteSyncOverAsync(SNIHandle pConn, [In] SNIPacket pPacket)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIWriteSyncOverAsync(pConn, pPacket) :
            SNINativeManagedWrapperX86.SNIWriteSyncOverAsync(pConn, pPacket));
 }
 internal static uint SNITerminate()
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNITerminate() :
            SNINativeManagedWrapperX86.SNITerminate());
 }
 internal static uint SNISetInfo(SNIHandle pConn, QTypes QType, [In] ref uint pbQInfo)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNISetInfo(pConn, QType, ref pbQInfo) :
            SNINativeManagedWrapperX86.SNISetInfo(pConn, QType, ref pbQInfo));
 }
 internal static uint SNIClose(IntPtr pConn)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIClose(pConn) :
            SNINativeManagedWrapperX86.SNIClose(pConn));
 }
 private static uint SNIGetPeerAddrStrWrapper([In] SNIHandle pConn, int bufferSize, StringBuilder addrBuffer, out uint addrLen)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen) :
            SNINativeManagedWrapperX86.SNIGetPeerAddrStrWrapper(pConn, bufferSize, addrBuffer, out addrLen));
 }
 internal static uint SNIWaitForSSLHandshakeToComplete([In] SNIHandle pConn, int dwMilliseconds, out uint pProtocolVersion)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion) :
            SNINativeManagedWrapperX86.SNIWaitForSSLHandshakeToComplete(pConn, dwMilliseconds, out pProtocolVersion));
 }
 internal static uint SNIRemoveProvider(SNIHandle pConn, ProviderEnum ProvNum)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIRemoveProvider(pConn, ProvNum) :
            SNINativeManagedWrapperX86.SNIRemoveProvider(pConn, ProvNum));
 }
 private static IntPtr SNIClientCertificateFallbackWrapper(IntPtr pCallbackContext)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.SNIClientCertificateFallbackWrapper(pCallbackContext) :
            SNINativeManagedWrapperX86.SNIClientCertificateFallbackWrapper(pCallbackContext));
 }
 internal static uint UnmanagedIsTokenRestricted([In] IntPtr token, [MarshalAs(UnmanagedType.Bool)] out bool isRestricted)
 {
     return(s_is64bitProcess ?
            SNINativeManagedWrapperX64.UnmanagedIsTokenRestricted(token, out isRestricted) :
            SNINativeManagedWrapperX86.UnmanagedIsTokenRestricted(token, out isRestricted));
 }