IoTHubMessage_GetProperty()

Gets a IotHub Message's properties item. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.

Syntax

#include "azure-iot-sdk-c/iothub_client/inc/iothub_message.h"

const char* IoTHubMessage_GetProperty(
  IOTHUB_MESSAGE_HANDLE  iotHubMessageHandle,
  const char *           key
);

Parameters

  • iotHubMessageHandle Handle to the message.

  • key name of the property to retrieve.

Return Value

A string with the property's value, or NULL if it does not exist in the properties list.