Hello @David , Could you please add more info on your C lang Code snippet or any Github link where we can have a look at the public facing code snippet?
Please add any tutorial or the document reference which you have followed for getting started on this scenario.
Community SME's on this topic or our team will review your scenario and circle back at the possible earliest time.
Reference:
First, create a message:
static void SendConfirmationCallback(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void* userContextCallback)
{
EVENT_INSTANCE* eventInstance = (EVENT_INSTANCE*)userContextCallback;
(void)printf("Confirmation[%d] received for message tracking id = %zu with result = %s\r\n", callbackCounter, eventInstance->messageTrackingId, MU_ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
/* Some device specific action code goes here... */
callbackCounter++;
IoTHubMessage_Destroy(eventInstance->messageHandle);
}
Note the call to the IoTHubMessage_Destroy function when you're done with the message. This function frees the resources allocated when you created the message.