IoTHubRegistryManager_CreateDevice_Ex()

Creates a device on IoT Hub.

Syntax

#include "azure-iot-sdk-c/iothub_service_client/inc/iothub_registrymanager.h"

IOTHUB_REGISTRYMANAGER_RESULT IoTHubRegistryManager_CreateDevice_Ex(
  IOTHUB_REGISTRYMANAGER_HANDLE  registryManagerHandle,
  const                          deviceCreate,
  IOTHUB_DEVICE_EX               device
);

Parameters

  • registryManagerHandle The handle created by a call to the create function.

  • deviceCreate IOTHUB_REGISTRY_DEVICE_CREATE_EX structure containing the new device Id, primaryKey (optional) and secondaryKey (optional)

  • device Input parameter, if it is not NULL will contain the created device info structure

Return Value

IOTHUB_REGISTRYMANAGER_RESULT_OK upon success or an error code upon failure.