ePass1000 C/C++ API Reference Manual Version 2.0

epas_GetProperty

The epas_GetProperty function retrieves property information from the library, driver the currently opened device.

EPAS_STATUS EPAS_API
epas_GetProperty(
    EPAS_HANDLE hContextHandle,       // [in]
    unsigned long ulFlags,             // [in]
    void* pRefData,                   // [in]
    void* pPropData,                  // [in][out]
    unsigned long ulPropSize          // [in]
);

Requirement

epas_CreateContext, epas_OpenDevice

Parameters

hContextHandle
[in] Handle to device context.
ulFlags
[in] This parameter defines the property to retrieve as follows:
Flag Meaning
EPAS_PROP_CAPABILITIES Retrieves the capabilities of the device.
EPAS_PROP_MEM_SIZE Retrieves the total memory size of the device.
EPAS_PROP_ACCESSINFO Retrieves the Global Access Control information of the device.
EPAS_PROP_SYSINFO Retrieves system information of the device.
EPAS_PROP_APP_NAME Retrieves Application Name of the current directory.
EPAS_PROP_APP_GUID Retrieves Application GUID of the current directory.
EPAS_PROP_VERSIONINFO Retrieves version of the firmware, driver and file system.
EPAS_PROP_SERNUM Retrieves the 64-bit serial number of the device.
EPAS_PROP_FRIENDLY_NAME Retrieves the friendly name of the device.
pRefData
[in] Reserved for future extension. Must be set to zero.
pPropData
[in] Property Data. Depending on ulFlags, the pPropData is defined as:
Flag Meaning
EPAS_PROP_CAPABILITIES pPropData points to an unsigned long integer which contains the capabilities of the device. The returned value is a bit mask. EPAS_CAPS_MD5_HMAC is supported currently.
EPAS_PROP_MEM_SIZE pPropData is a pointer to an unsigned long integer that receives the total memory size of the device, in bytes.
EPAS_PROP_ACCESSINFO pPropData is a pointer to an EPAS_ACCESSINFO structure that receives the Access Control setting of the device.
EPAS_PROP_SYSINFO pPropData is a pointer to an EPAS_SYSINFO structure that receives system information on the device. You should zero initialize this structure before calling the function.
EPAS_PROP_APP_NAME pPropData is a pointer to a buffer of size EPAS_APP_NAME_SIZE, that receives the Application Name of the current directory as a NULL terminated string.
EPAS_PROP_APP_GUID pPropData is a pointer to a buffer of 16 bytes that receives the Application GUID of the current directory.
EPAS_PROP_VERSIONINFO pPropData is a pointer to an EPAS_VERSIONINFO structure that receives the version information of the driver and the device.
EPAS_PROP_SERNUM pPropData is a pointer to an array of two unsigned long integer that receives the 64-bit serial number of the device.
EPAS_PROP_FRIENDLY_NAME pPropData is a pointer to a buffer of size EPAS_FRIENDLY_NAME_SIZE that receives the friendly name of the device as a NULL terminated string.
ulPropSize
[in] Size of the pPropData buffer.

Return Values

If the function succeeds, FT_SUCCESS returned.

If the specified item does not found, FT_ITEM_NOT_FOUND returned.

For a list of all return codes, see Status Return Values.

Sample Code

EPAS_STATUS epsRet;
EPAS_HANDLE handle;
unsigned long    pulSN[2];


epsRet = epas_GetProperty( hePass,                 // handle to the device
                           EPAS_PROP_SERNUM,       // flags
                           NULL,                   // reference data, not used.
                           pulSN,                  // serial number buffer, 2 unsigned longs
                           sizeof(pulSN)           // size of buffer
                         );
epsRet = epas_GetProperty( hePass,                 // handle to the device
                           EPAS_PROP_FRIENDLY_NAME,// flags
                           NULL,                   // reference data, not used
                           szTokenName,            // token name buffer
                           sizeof(szTokenName)     // sizeo of buffer
                         );

See Also

epas_SetProperty, epas_Cleanup, epas_GetLibVersion, epas_GetDriverVersion