차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 | |||
ko:bs2_getusersmalldatasex [2020/08/21 11:41] kkshin [파라미터] |
ko:bs2_getusersmalldatasex [2021/12/29 16:42] mark [반환값] |
||
---|---|---|---|
줄 48: | 줄 48: | ||
==== 반환값 ==== | ==== 반환값 ==== | ||
성공적으로 수행될 경우 ''BS_SDK_SUCCESS''를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. | 성공적으로 수행될 경우 ''BS_SDK_SUCCESS''를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. | ||
- | \\ | + | \\ |
+ | ==== 샘플코드 ==== | ||
+ | C# | ||
+ | <code cpp> | ||
+ | result = (BS2ErrorCode)API.BS2_GetUserSmallDatasEx(sdkContext, deviceID, curUidObjs, available, userBlobs, (UInt32)BS2UserMaskEnum.ALL); | ||
+ | if (result == BS2ErrorCode.BS_SDK_SUCCESS) | ||
+ | { | ||
+ | for (UInt32 loop = 0; loop < available; ++loop) | ||
+ | { | ||
+ | print(userBlobs[loop].user); | ||
+ | // don't need to release cardObj, FingerObj, FaceObj because we get only BS2User | ||
+ | if (userBlobs[loop].cardObjs != IntPtr.Zero) | ||
+ | API.BS2_ReleaseObject(userBlobs[loop].cardObjs); | ||
+ | if (userBlobs[loop].fingerObjs != IntPtr.Zero) | ||
+ | API.BS2_ReleaseObject(userBlobs[loop].fingerObjs); | ||
+ | if (userBlobs[loop].faceObjs != IntPtr.Zero) | ||
+ | API.BS2_ReleaseObject(userBlobs[loop].faceObjs); | ||
+ | if (userBlobs[loop].user_photo_obj != IntPtr.Zero) | ||
+ | API.BS2_ReleaseObject(userBlobs[loop].user_photo_obj); | ||
+ | } | ||
+ | |||
+ | idx += available; | ||
+ | curUidObjs += (int)available * BS2Environment.BS2_USER_ID_SIZE; | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | Console.WriteLine("Got error({0}).", result); | ||
+ | break; | ||
+ | } | ||
+ | </code> | ||
+ | |||
==== 함께 보기 ==== | ==== 함께 보기 ==== | ||
[[BS2_EnrollUserSmall]]\\ | [[BS2_EnrollUserSmall]]\\ |