차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
ko:bs2_getuserinfosex [2021/12/27 15:09]
mark [반환값]
ko:bs2_getuserinfosex [2021/12/29 10:07]
mark [샘플코드]
줄 21: 줄 21:
 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다.
 \\  \\ 
 +</​code>​
 +==== 샘플코드 ====
 +C#
 +<code cpp>
 +BS2User user = userList[selection];​
 +BS2UserBlobEx[] userBlob = Util.AllocateStructureArray<​BS2UserBlobEx>​(1);​
 +if (dbHandler.GetUserBlobEx(ref deviceInfo, ref user, ref userBlob[0]))
 +{
  
 +}                              ​
 +if (result != BS2ErrorCode.BS_SDK_SUCCESS)
 +{
 +    Console.WriteLine("​Got error({0}).",​ result);
 +}
  
-BS2User user = userList[selection]+if (userBlob[0].cardObjs !IntPtr.Zero
-                            BS2UserBlobEx[] userBlob ​Util.AllocateStructureArray<​BS2UserBlobEx>​(1); +
-                            if (dbHandler.GetUserBlobEx(ref deviceInfo, ref user, ref userBlob[0])) +    Marshal.FreeHGlobal(userBlob[0].cardObjs); 
-                            { +
-                                Console.WriteLine("​Trying to enroll user."); +if (userBlob[0].fingerObjs ​!= IntPtr.Zero
-                                ​BS2ErrorCode result = (BS2ErrorCode)API.BS2_EnrolUserEx(sdkContext,​ deviceID, ​userBlob, 1, 1); +
-                                //​BS2ErrorCode result = (BS2ErrorCode)API.BS2_EnrollUserEx(sdkContext,​ deviceID, userBlob, 1, 1); +    ​Marshal.FreeHGlobal(userBlob[0].fingerObjs); 
-                                if (result ​!= BS2ErrorCode.BS_SDK_SUCCESS+
-                                +if (userBlob[0].faceObjs ​!= IntPtr.Zero) 
-                                    ​Console.WriteLine("Got error({0}).", result); +
-                                +     ​Marshal.FreeHGlobal(userBlob[0].faceObjs); 
- +} 
-                                ​if (userBlob[0].cardObjs ​!= IntPtr.Zero) +</​code>​
-                                +
-                                    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);​ 
-                                } 
-                            } 
 ==== 함께 보기 ==== ==== 함께 보기 ====
 [[BS2_GetUserList]]\\ [[BS2_GetUserList]]\\