pDeviceInfo = _StringConverter::CopyToCharArrayN(deviceInfo);
deviceInfoBuffer.Construct(deviceInfo.GetLength());
- deviceInfoBuffer.SetArray(reinterpret_cast <byte*>(pDeviceInfo), 0, deviceInfo.GetLength());
+ r = deviceInfoBuffer.SetArray(reinterpret_cast <byte*>(pDeviceInfo), 0, deviceInfo.GetLength());
+ SysTryCatch(NID_SEC, r == E_SUCCESS, , r, "[%s] A system error has occurred.", GetErrorMessage(r));
deviceInfoBuffer.Flip();
delete[] pDeviceInfo;
pDeviceInfo = _StringConverter::CopyToCharArrayN(deviceInfo);
deviceInfoBuffer.Construct(deviceInfo.GetLength());
- deviceInfoBuffer.SetArray(reinterpret_cast <byte*>(pDeviceInfo), 0, deviceInfo.GetLength());
+ r = deviceInfoBuffer.SetArray(reinterpret_cast <byte*>(pDeviceInfo), 0, deviceInfo.GetLength());
+ SysTryCatch(NID_SEC, r == E_SUCCESS, , r, "[%s] A system error has occurred.", GetErrorMessage(r));
deviceInfoBuffer.Flip();
delete[] pDeviceInfo;