internal static IntPtr SCardConnect( [In] IntPtr hContext, [In] byte[] szReader, [In] IntPtr dwShareMode, [In] IntPtr dwPreferredProtocols, [Out] out IntPtr phCard, [Out] out IntPtr pdwActiveProtocol) { if (_osUnixPlatform == OSUnixPlatform.Linux) { return(LinuxNativeMethods.SCardConnect(hContext, szReader, dwShareMode, dwPreferredProtocols, out phCard, out pdwActiveProtocol)); } else if (_osUnixPlatform == OSUnixPlatform.OSX) { return(OSXNativeMethods.SCardConnect(hContext, szReader, dwShareMode, dwPreferredProtocols, out phCard, out pdwActiveProtocol)); } else { throw new NotImplementedException(); } }