ePass1000 C/C++ API Reference Manual Version 2.0

epas_SetProperty

The epas_SetProperty function sets property information in the currently opened device.

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

Requirement

epas_CreateContext, epas_OpenDevice

Parameters

hContextHandle
[in] Handle to device context.
ulFlags
[in] This parameter defines which property information is to be set.
Flag Meaning
EPAS_PROP_ACCESSINFO Set the Global Access Control of the device.
EPAS_PROP_LED_ON Turn LED of the device on.
EPAS_PROP_LED_OFF Turn LED of the device off.
EPAS_PROP_FRIENDLY_NAME Set the friendly name of the device.
pRefData
[in] Reserved for future extension. Must be set to zero.
pPropData
[in] This parameter is a pointer to a buffer of the property data to be set.
Flag Meaning
EPAS_PROP_ACCESSINFO pPropData is a pointer to an EPAS_ACCESSINFO structure that is the Global Access Control setting to be set.
EPAS_PROP_LED_ON pPropData is not used and should be set to NULL.
EPAS_PROP_LED_OFF pPropData is not used and should be set to NULL.
EPAS_PROP_FRIENDLY_NAME pPropData is a pointer to a NULL terminated string which is the friendly name to be assigned to the device. Length of the friendly name should in the range of 0 to EPAS_FRIENDLY_NAME_SIZE - 1.
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 ulLedState = EPAS_PROP_LED_ON;
epsRet = epas_SetProperty( handle,          // handle to the current device
                           ulLedState,      // flags, the LED state to set
                           NULL,            // Reference data, not used.
                           NULL,            // Property data, not used
                           0                // Property data size, not used.
                         );

See Also

epas_GetProperty, epas_Cleanup, epas_GetLibVersion, epas_GetDriverVersion