Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than winscard, prefix the name with the module name and a period.
SCardGetAttrib (winscard)
.
C# Signature:
[DllImport("winscard.dll", SetLastError=true)]
static extern Int32 SCardGetAttrib(
IntPtr hCard, // Reference value returned from SCardConnect
UInt32 dwAttrId, // Identifier for the attribute to get
byte[] pbAttr, // Pointer to a buffer that receives the attribute
ref IntPtr pcbAttrLen // Length of pbAttr in bytes
);
);
VB Signature:
Declare Function SCardGetAttrib Lib "winscard.dll" (TODO) As TODO
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
// SCARD_ATTR_ATR_STRING = SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303) in WinSCard.h
const UInt32 SCARD_ATTR_ATR_STRING = 0x00090303;
IntPtr hCard; // Handle to the card
Int32 ret;
// Copy code to establish context here
// Copy code to connect to the card here
// Get the Answer to Rest
byte[] pbAttr = new byte[255];
IntPtr pcbAttrLen = new IntPtr(pbAttr.Length);
ret = SCardGetAttrib(hCard, SCARD_ATTR_ATR_STRING, pbAttr, ref pcbAttrLen);
ret = SCardGetAttribe(hCard, SCARD_ATTR_ATR_STRING, pbAttr, ref pcbAttrLen);
"The SCardGetAttrib function gets the current reader attributes for the specified handle. It does not affect the state of the reader, driver, or card." [http://msdn.microsoft.com/en-us/library/aa379559(VS.85).aspx]
3/6/2010 1:40:07 AM - mrprgrmr-12.11.145.74
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).