AzureSphere/AzureSphereSampleDevice/main.c
static bool SetUpAzureIoTHubClientWithDps(void)
{
    AZURE_SPHERE_PROV_RETURN_VALUE provResult =
        IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning(scopeId, 10000,
                                                                          &iothubClientHandle);
    Log_Debug("IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning returned '%s'.\n",
              GetAzureSphereProvisioningResultString(provResult));

    if (provResult.result != AZURE_SPHERE_PROV_RESULT_OK) {
        return false;
    }

    return true;
}
/// <summary>
///     Sets up the Azure IoT Hub connection (creates the iothubClientHandle)
///     with DPS
/// </summary>

Sets up the Azure IoT Hub connection (creates the iothubClientHandle)
with DPS

Sets up the Azure IoT Hub connection ( creates the iothubClientHandle ) with DPS
static bool SetUpAzureIoTHubClientWithDps(void)
{
    AZURE_SPHERE_PROV_RETURN_VALUE provResult =
        IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning(scopeId, 10000,
                                                                          &iothubClientHandle);
    Log_Debug("IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning returned '%s'.\n",
              GetAzureSphereProvisioningResultString(provResult));
    if (provResult.result != AZURE_SPHERE_PROV_RESULT_OK) {
        return false;
    }
    return true;
}
static bool SetUpAzureIoTHubClientWithDps ( void ) { AZURE_SPHERE_PROV_RETURN_VALUE provResult = IoTHubDeviceClient_LL_CreateWithAzureSphereDeviceAuthProvisioning ( scopeId , 10000 , & iothubClientHandle ) ; Log_Debug ( " \n " , GetAzureSphereProvisioningResultString ( provResult ) ) ; if ( provResult . result != AZURE_SPHERE_PROV_RESULT_OK ) { return false ; } return true ; }
<summary>
Sets up the Azure IoT Hub connection (creates the iothubClientHandle)
with DPS
</summary>
<summary > Sets up the Azure IoT Hub connection ( creates the iothubClientHandle ) with DPS < / summary >