/// <summary>Gets an attribute from the IFD Handler (reader driver).</summary> /// <param name="attributeId">Identifier for the attribute to get.</param> /// <param name="attribute">A buffer that receives the attribute.</param> /// <returns> /// <list type="table"> /// <listheader> /// <term>Return code</term> /// <description>Description</description> /// </listheader> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.Success" /> /// </term> /// <description>Successful (SCARD_S_SUCCESS)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InsufficientBuffer" /> /// </term> /// <description> /// <paramref name="attribute" /> is too big - indicates an error in the PC/SC class library. (SCARD_E_INSUFFICIENT_BUFFER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InsufficientBuffer" /> /// </term> /// <description>Reader buffer <paramref name="attribute" /> not large enough - indicates an error in the PC/SC class library. (SCARD_E_INSUFFICIENT_BUFFER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidHandle" /> /// </term> /// <description>Invalid card handle (SCARD_E_INVALID_HANDLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidParameter" /> /// </term> /// <description>A parameter is <see langword="null" /> and should not (SCARD_E_INVALID_PARAMETER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NoMemory" /> /// </term> /// <description>Memory allocation failed (SCARD_E_NO_MEMORY)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NoService" /> /// </term> /// <description>The server is not runing (SCARD_E_NO_SERVICE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NotTransacted" /> /// </term> /// <description>Data exchange not successful (SCARD_E_NOT_TRANSACTED)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.ReaderUnavailable" /> /// </term> /// <description>The reader has been removed (SCARD_E_READER_UNAVAILABLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.CommunicationError" /> /// </term> /// <description>An internal communications error has been detected (SCARD_F_COMM_ERROR)</description> /// </item> /// </list> /// </returns> /// <remarks>This method calls the API function SCardGetAttrib().</remarks> public SCardError GetAttrib(SCardAttribute attributeId, out byte[] attribute) { return GetAttrib((IntPtr) attributeId, out attribute); }
/// <summary>Gets an attribute from the IFD Handler (reader driver).</summary> /// <param name="attributeId">Identifier for the attribute to get.</param> /// <param name="attribute">A buffer that receives the attribute.</param> /// <param name="attributeBufferLength">Size of the result contained in attribute (in bytes).</param> /// <returns> /// <list type="table"> /// <listheader> /// <term>Return code</term> /// <description>Description</description> /// </listheader> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.Success" /> /// </term> /// <description>Successful (SCARD_S_SUCCESS)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InsufficientBuffer" /> /// </term> /// <description> /// <paramref name="attribute" /> is too big - indicates an error in the PC/SC class library. (SCARD_E_INSUFFICIENT_BUFFER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InsufficientBuffer" /> /// </term> /// <description>Reader buffer <paramref name="attribute" /> not large enough - indicates an error in the PC/SC class library. (SCARD_E_INSUFFICIENT_BUFFER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidHandle" /> /// </term> /// <description>Invalid card handle (SCARD_E_INVALID_HANDLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidParameter" /> /// </term> /// <description>A parameter is <see langword="null" /> and should not (SCARD_E_INVALID_PARAMETER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NoMemory" /> /// </term> /// <description>Memory allocation failed (SCARD_E_NO_MEMORY)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NoService" /> /// </term> /// <description>The server is not runing (SCARD_E_NO_SERVICE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NotTransacted" /> /// </term> /// <description>Data exchange not successful (SCARD_E_NOT_TRANSACTED)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.ReaderUnavailable" /> /// </term> /// <description>The reader has been removed (SCARD_E_READER_UNAVAILABLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.CommunicationError" /> /// </term> /// <description>An internal communications error has been detected (SCARD_F_COMM_ERROR)</description> /// </item> /// </list> /// <para>The method will return <see cref="F:PCSC.SCardError.InsufficientBuffer" /> if <paramref name="attribute" /> is /// <see langword="null" /> or if the buffer size is not sufficient. /// <paramref name="attributeBufferLength" /> contains the required amount of bytes (size).</para> /// <para>If the method returned with <see cref="F:PCSC.SCardError.Success" /> then <paramref name="attributeBufferLength" /> contains the exact size of the result in /// <paramref /// name="attribute" /> /// .</para> /// <para>For an example please see <see cref="M:PCSC.ISCardReader.GetAttrib(PCSC.SCardAttribute,System.Byte[]@)" />.</para> /// </returns> /// <remarks>This method calls the API function SCardGetAttrib().</remarks> public SCardError GetAttrib(SCardAttribute attributeId, byte[] attribute, out int attributeBufferLength) { return GetAttrib((IntPtr) attributeId, attribute, out attributeBufferLength); }
/// <inheritdoc /> public void SetAttrib(SCardAttribute attributeId, byte[] sendBuffer) { SetAttrib((IntPtr)attributeId, sendBuffer); }
/// <summary>Set an attribute of the IFD Handler.</summary> /// <param name="attributeId">Identifier for the attribute to set.</param> /// <param name="attribute">Buffer that contains the new value of the attribute.</param> /// <returns> /// <list type="table"> /// <listheader> /// <term>Value</term> /// <description>Description</description> /// </listheader> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.Success" /> /// </term> /// <description>Successful (SCARD_S_SUCCESS)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InsufficientBuffer" /> /// </term> /// <description>attribute is too big (SCARD_E_INSUFFICIENT_BUFFER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidHandle" /> /// </term> /// <description>Invalid card handle (SCARD_E_INVALID_HANDLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.InvalidParameter" /> /// </term> /// <description>A parameter is <see langword="null" /> and should not (SCARD_E_INVALID_PARAMETER)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NoService" /> /// </term> /// <description>The server is not runing (SCARD_E_NO_SERVICE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.NotTransacted" /> /// </term> /// <description>Data exchange not successful (SCARD_E_NOT_TRANSACTED)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.ReaderUnavailable" /> /// </term> /// <description>The reader has been removed (SCARD_E_READER_UNAVAILABLE)</description> /// </item> /// <item> /// <term> /// <see cref="F:PCSC.SCardError.CommunicationError" /> /// </term> /// <description>An internal communications error has been detected (SCARD_F_COMM_ERROR)</description> /// </item> /// </list> /// </returns> /// <remarks> /// <para>The list of attributes you can set depends on the IFD handler you are using.</para> /// <para>This method calls the API function SCardSetAttrib().</para> /// </remarks> public SCardError SetAttrib(SCardAttribute attributeId, byte[] attribute) { return SetAttrib((IntPtr) attributeId, attribute, attribute.Length); }
/// <inheritdoc /> public byte[] GetAttrib(SCardAttribute attributeId) { return(GetAttrib((IntPtr)attributeId)); }
/// <inheritdoc /> public void SetAttrib(SCardAttribute attributeId, byte[] sendBuffer, int sendBufferLength) { SetAttrib((IntPtr)attributeId, sendBuffer, sendBufferLength); }
/// <inheritdoc /> public int GetAttrib(SCardAttribute attributeId, byte[] receiveBuffer) { return(GetAttrib((IntPtr)attributeId, receiveBuffer)); }
public SCardError SetAttrib(SCardAttribute attributeId, byte[] attribute) { throw new NotImplementedException(); }
public SCardError SetAttrib(SCardAttribute attributeId, byte[] attribute, int attributeBufferLength) { throw new NotImplementedException(); }
/// <inheritdoc /> public SCardError SetAttrib(SCardAttribute attributeId, byte[] attribute, int attributeBufferLength) { return(SetAttrib((IntPtr)attributeId, attribute, attributeBufferLength)); }
/// <inheritdoc /> public SCardError GetAttrib(SCardAttribute attributeId, out byte[] attribute) { return(GetAttrib((IntPtr)attributeId, out attribute)); }