This API specifies a call back to be used when the device receives a desired state update.
IOTHUB_CLIENT_RESULT IoTHubClient_LL_SetDeviceTwinCallback( IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK deviceTwinCallback, void * userContextCallback );
iotHubClientHandleThe handle created by a call to the create function.
deviceTwinCallbackThe callback specified by the device client to be used for updating the desired state. The callback will be called in response to patch request send by the IoTHub services. The payload will be passed to the callback, along with two version numbers:
userContextCallbackUser specified context that will be provided to the callback. This can be NULL.
NOTE: The application behavior is undefined if the user calls the IoTHubClient_LL_Destroy function from within any callback.
IOTHUB_CLIENT_OK upon success or an error code upon failure.