차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
ko:bs2_enrollusersmall [2019/05/14 14:36]
kkshin
ko:bs2_enrollusersmall [2021/12/29 15:10] (현재)
mark [샘플코드]
줄 7: 줄 7:
 [+ 2.6.3] 새로운 사용자를 등록합니다. \\ [+ 2.6.3] 새로운 사용자를 등록합니다. \\
 [[user management api#​BS2UserBlob]]을 이용하는 [[BS2_EnrollUser]]와의 차이는 \\ [[user management api#​BS2UserBlob]]을 이용하는 [[BS2_EnrollUser]]와의 차이는 \\
-메모리 효율을 위해 3번째 인자 BS2UserSmallBlob 멤버 BS2UserPhoto가 포인터 처리된 것을 제외하고 모두 동일합니다. +메모리 효율을 위해 3번째 인자 BS2UserSmallBlob 멤버 BS2UserPhoto가 포인터 처리된 것을 제외하고 모두 동일합니다. ​\\  
-\\ +<WRAP tip 70%> 
 +**도움말**\\ 
 +<wrap em>​FaceStation F2</​wrap>​로 사용자 전송을 위해서는 [[BS2_EnrollUserFaceEx]]를 사용해 주십시오. 
 +</​WRAP>​
 ==== 함수 ==== ==== 함수 ====
 <code cpp> <code cpp>
줄 28: 줄 31:
 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다.
 \\  \\ 
 +
 +==== 샘플코드 ====
 +C#
 +<code cpp>
 + if (dbHandler.GetUserBlobEx(ref deviceInfo, ref user, ref userBlob[0]))
 +{
 +     ​Console.WriteLine("​Trying to enroll user."​);​
 +     ​BS2ErrorCode result = (BS2ErrorCode)API.BS2_EnrollUserSmall(sdkContext,​ deviceID, userBlob, 1, 1);
 +     if (result != BS2ErrorCode.BS_SDK_SUCCESS)
 +     {
 +         ​Console.WriteLine("​Got error({0}).",​ result);
 +     }
 + 
 +     if (userBlob[0].cardObjs != IntPtr.Zero)
 +     {
 +          Marshal.FreeHGlobal(userBlob[0].cardObjs);​
 +     }
 +     if (userBlob[0].fingerObjs != IntPtr.Zero)
 +     {
 +          Marshal.FreeHGlobal(userBlob[0].fingerObjs);​
 +     }
 +     if (userBlob[0].faceObjs != IntPtr.Zero)
 +     {
 +          Marshal.FreeHGlobal(userBlob[0].faceObjs);​
 +     }
 +     if (userBlob[0].user_photo_obj != IntPtr.Zero)
 +     {
 +          Marshal.FreeHGlobal(userBlob[0].user_photo_obj);​
 +     }
 +
 +</​code>​
 +
 +
 ==== 함께 보기 ==== ==== 함께 보기 ====
 [[BS2_EnrollUserSmall]]\\ [[BS2_EnrollUserSmall]]\\