User Management API > BS2_GetUserList
함수
#include "BS_API.h"
int BS2_GetUserList(void* context, uint32_t deviceId, char** uidsObjs, uint32_t* numUid, IsAcceptableUserID ptrIsAcceptableUserID);
파라미터
반환값
성공적으로 수행될 경우 BS_SDK_SUCCESS
를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다.
샘플코드
C++
char* uidObj = NULL;
uint32_t numUID = 0;
int sdkResult = BS2_GetUserList(context_, id, &uidObj, &numUID, isAcceptableUID);
if (BS_SDK_SUCCESS != sdkResult)
{
TRACE("BS2_GetUserList call failed: %d", sdkResult);
return sdkResult;
}
// My Codes
//
// My Codes
BS2_ReleaseObject(uidObj);
C#
IntPtr outUidObjs = IntPtr.Zero;
UInt32 numUserIds = 0;
API.IsAcceptableUserID cbIsAcceptableUserID = null; // we don't need to user id filtering
IntPtr ptrDir = Marshal.StringToHGlobalAnsi(strDir);
BS2ErrorCode result = (BS2ErrorCode)API.BS2_GetUserList(sdkContext, deviceID, out outUidObjs, out numUserIds, cbIsAcceptableUserID);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
Console.WriteLine("Got error({0}).", result);
return;
}
API.BS2_ReleaseObject(outUidObjs);
함께 보기