차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
ko:bs2_getcustomcardconfig [2023/08/31 21:32]
kkshin [샘플코드(C#)]
ko:bs2_getcustomcardconfig [2023/08/31 21:36] (현재)
kkshin [샘플코드(C++)]
줄 27: 줄 27:
  
 <file cpp sample_getcustomcardconfig.cpp>​ <file cpp sample_getcustomcardconfig.cpp>​
- int sdkResult = BS2_GetCustomCardConfig(context_, ​id, &config);+ ConfigControl cc(context);​ 
 + DeviceControl dc(context);​ 
 + BS2DeviceCapabilities capabilies = { 0, }; 
 + BS2CustomCardConfig config = { 0, }; 
 + 
 + BS2_DEVICE_ID id = Utility::​getSelectedDeviceID(device);​ 
 + 
 + int sdkResult = dc.getDeviceCapabilities(id, capabilies);
  if (BS_SDK_SUCCESS != sdkResult)  if (BS_SDK_SUCCESS != sdkResult)
- printf("BS2_GetCustomCardConfig call failed%d", sdkResult);+ return sdkResult;​ 
 + 
 + if (!capabilies.customSmartCardSupported) 
 +
 + TRACE("Not supported function."​);​ 
 + return BS_SDK_ERROR_NOT_SUPPORTED;​ 
 +
 + 
 + sdkResult = cc.getCustomCardConfig(id,​ config); 
 + if (BS_SDK_SUCCESS == sdkResult) 
 + ConfigControl::​print(config);​ 
 + else 
 + return sdkResult;​ 
 + 
 + if (Utility::​isYes("Do you want to scan card test?"​)) 
 +
 + UserControl uc(context);​ 
 + BS2Card cardID; 
 + 
 + sdkResult = uc.scanCard(id&​cardID);​ 
 + if (BS_SDK_SUCCESS == sdkResult
 + UserControl::​print(cardID); 
 +
  return sdkResult;  return sdkResult;
 </​file>​ </​file>​