This is an old revision of the document!
Configuration API > BS2_GetCustomCardConfig
[+ 2.9.4] Retrieves Custom smart card settings.
Declaration
#include "BS_API.h"
int BS2_GetCustomCardConfig(void* context, uint32_t deviceId, BS2CustomCardConfig* config);
Parameter
Return Value
If successfully done, BS_SDK_SUCCESS
will be returned. If there is an error, the corresponding error code will be returned.
See Also
Sample Code(C++)
- sample_getcustomcardconfig.cpp
int sdkResult = BS2_GetCustomCardConfig(context_, id, &config);
if (BS_SDK_SUCCESS != sdkResult)
printf("BS2_GetCustomCardConfig call failed: %d", sdkResult);
return sdkResult;
Sample Code(C#)
- sample_getcustomcardconfig.cs
BS2DeviceCapabilities capa;
if (!CommonControl.getDeviceCapabilities(sdkContext, deviceID, out capa))
return;
if (!Convert.ToBoolean(capa.functionExSupported & (byte)BS2CapabilityFunctionExSupport.FUNCTIONEX_SUPPORT_CUSTOMSMARTCARD))
{
Console.WriteLine("Not supported function.");
return;
}
BS2CustomCardConfig config;
Console.WriteLine("Trying to get CustomCardConfig");
BS2ErrorCode result = (BS2ErrorCode)API.BS2_GetCustomCardConfig(sdkContext, deviceID, out config);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
Console.WriteLine("Got error({0}).", result);
return;
}
else
{
print(config);
}