+ else if (tizenKey == _DUID)
+ {
+ r = GetFromRegistry(tizenKey, value);
+
+ if(r != E_SUCCESS || value == L"ERROR")
+ {
+ ArrayList requestMessage;
+ ArrayList responseMessage;
+
+ _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
+
+ _IpcClient* pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
+ SysTryReturn(NID_SYS, pIpcClient != null, E_OUT_OF_MEMORY, r, "It is failed to create IPC instance.");
+
+ requestMessage.Construct();
+ responseMessage.Construct();
+
+ String serviceId(_SYSTEM_SERVICE_ID);
+ String commandId(L"osp.system.command.get.duid.internal");
+
+ requestMessage.Add(serviceId);
+ requestMessage.Add(commandId);
+
+ unique_ptr<IoService_Request> pMsg(new (std::nothrow) IoService_Request(requestMessage, &responseMessage));
+ SysTryReturnResult(NID_SYS, pMsg != null, E_OUT_OF_MEMORY, "It is failed to create Ipc message");
+
+ r = pIpcClient->SendRequest(pMsg.get());
+ SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "It is failed to send ipc message. [%s]", GetErrorMessage(r));
+
+ String* pResult = (String*)responseMessage.GetAt(_SYSTEM_RESPONSE_DATA);
+ String* pDuid = (String*)responseMessage.GetAt(_SYSTEM_RESPONSE_DATA+1);
+
+ SysTryReturn(NID_SYS, pResult != null, r = E_SYSTEM, r, "It is failed to receive result on IPC response message.");
+ SysTryReturn(NID_SYS, pDuid != null, r = E_SYSTEM, r, "It is failed to receive IMEI value on IPC response message.");
+
+ SysTryReturn(NID_SYS, *pResult != _SYSTEM_RESULT_PRIVILEGED, r = E_PRIVILEGE_DENIED, r, "It is failed to get privilege.");
+ SysTryReturn(NID_SYS, *pResult == _SYSTEM_RESULT_OK, r = E_SYSTEM, r, "It is failed to get DUID value.");
+
+ value = *pDuid;
+
+ responseMessage.RemoveAll(true);
+ }
+ }