차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 | ||
ko:bs2_enrolluserex [2019/05/14 10:19] kkshin 만듦 |
ko:bs2_enrolluserex [2021/12/31 09:46] (현재) mark [샘플코드] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | ~~NOTOC~~ | ||
+ | [[user_management_api]] > [[BS2_EnrollUserEx]] | ||
+ | |||
+ | ---- | ||
+ | |||
===== BS2_EnrollUserEx ===== | ===== BS2_EnrollUserEx ===== | ||
- | [+ 2.6.3] 새로운 사용자를 등록합니다. | + | [+ 2.6.3] 새로운 사용자를 등록합니다.\\ |
- | \\ | + | 영국식 표현인 [[user_management_api#BS2_EnrolUserEx]]와 기능은 동일합니다. \\ |
+ | <WRAP tip 70%> | ||
+ | **도움말**\\ | ||
+ | <wrap em>FaceStation F2</wrap>로 사용자 전송을 위해서는 [[BS2_EnrollUserFaceEx]]를 사용해 주십시오. | ||
+ | </WRAP> | ||
==== 함수 ==== | ==== 함수 ==== | ||
<code cpp> | <code cpp> | ||
줄 20: | 줄 29: | ||
==== 반환값 ==== | ==== 반환값 ==== | ||
성공적으로 수행될 경우 ''BS_SDK_SUCCESS''를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. | 성공적으로 수행될 경우 ''BS_SDK_SUCCESS''를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. | ||
- | \\ | + | \\ |
+ | ==== 샘플코드 ==== | ||
+ | C# | ||
+ | <code cpp> | ||
+ | if (selection < userList.Count) | ||
+ | { | ||
+ | BS2User user = userList[selection]; | ||
+ | BS2UserBlobEx[] userBlob = Util.AllocateStructureArray<BS2UserBlobEx>(1); | ||
+ | if (dbHandler.GetUserBlobEx(ref deviceInfo, ref user, ref userBlob[0])) | ||
+ | { | ||
+ | Console.WriteLine("Trying to enroll user."); | ||
+ | BS2ErrorCode result = (BS2ErrorCode)API.BS2_EnrollUserEx(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); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
==== 함께 보기 ==== | ==== 함께 보기 ==== | ||
[[BS2_GetUserList]]\\ | [[BS2_GetUserList]]\\ |