Using Win32 functions in Visual FoxPro Image Gallery
Authentication
SCardConnect
SCardControl
SCardDisconnect
SCardEstablishContext
SCardGetAttrib
SCardGetProviderId
SCardIsValidContext
SCardListCards
SCardListInterfaces
SCardListReaderGroups
SCardListReaders
SCardReleaseContext
SCardStatus
SCardTransmit
Code examples:
SCardGetAttrib
..msdn    Add comment     W32 Constants      Translate this page
Gets the current reader attributes for the given handle. It does not affect the state of the reader, driver, or card.
Code examples:
Declaration:
LONG SCardGetAttrib(
  __in     SCARDHANDLE hCard,
  __in     DWORD dwAttrId,
  __out    LPBYTE pbAttr,
  __inout  LPDWORD pcbAttrLen
);
FoxPro declaration:
DECLARE LONG SCardGetAttrib IN Winscard;
    INTEGER hCard,;
    LONG dwAttrId,;
    STRING @pbAttr,;
    LONG @pcbAttrLen
Parameters:
hCard [in]
Reference value returned from SCardConnect.

dwAttrId [in]
Identifier for the attribute to get.

pbAttr [out]
Pointer to a buffer that receives the attribute whose ID is supplied in dwAttrId.

pcbAttrLen [in, out]
Length of the pbAttr buffer in bytes, and receives the actual length of the received attribute.
Return value:
Returns SCARD_S_SUCCESS (0) or error code.
Usage:
LOCAL nResult, nBufsize, cBuffer
nBufsize = 128
cBuffer = REPLICATE(CHR(0), nBufsize)

nResult = SCardGetAttrib(m.hCard, SCARD_ATTR_VENDOR_NAME,;
    @cBuffer, @nBufsize)

IF nResult = SCARD_S_SUCCESS
    ? SUBSTRING(m.cBuffer, 1, m.nBufsize)
ENDIF
My comment:
In Winsmcrd.h file the SCARD_ATTR_VALUE macro is used to define the attribute constants.

#define SCARD_ATTR_VENDOR_NAME
        SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0100)

The statement above can be translated into VFP code as follows:

#DEFINE SCARD_ATTR_VENDOR_NAME;
        BITOR(BITLSHIFT(SCARD_CLASS_VENDOR_INFO, 16), 0x0100)
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-10-23 16:33:24
Modified: 2008-10-23 16:48:11
Visited in last 7 days: 9
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.178.153)
5 sec.Function: 'NetUnjoinDomain'
12 sec.Function: 'DrawDibClose'
18 sec.Function: 'NetFileGetInfo'
25 sec.Function: 'GetFileVersionInfoSize'
32 sec.Function: 'SetEnvironmentVariable'
39 sec.Function: 'GetSystemTimeAdjustment'
47 sec.Function: 'DeregisterEventSource'
54 sec.Function: 'ClearEventLog'
1.03 min.
Function group: 'File Mapping'
1.15 min.Function: 'FtpPutFile'
Google
Advertise here!