grib_api: Handling coded messages

- Main Page
- Modules
- Files
- Related Pages
- Examples

# Handling coded messages

## Functions
int | grib_get_message (grib_handle *h, const void **message, size_t *message_length)
| getting the message attached to a handle
int | grib_get_message_copy (grib_handle *h, void *message, size_t *message_length)
| getting a copy of the message attached to a handle

## Detailed Description

## Function Documentation

int grib_get_message | ( | grib_handle * | h,
|  | const void ** | message,
|  | size_t * | message_length |
| ) |  |  |

getting the message attached to a handle

Parameters:

  | h | : the grib handle to wich the buffer should be gathered
  | message | : the pointer to be set to the handle's data
  | message_length | : at exist, the message size in number of bytes

Returns:
  0 if OK, integer value on error

Examples:
  precision.c, and set.c.

int grib_get_message_copy | ( | grib_handle * | h,
|  | void * | message,
|  | size_t * | message_length |
| ) |  |  |

getting a copy of the message attached to a handle

Parameters:

  | h | : the grib handle to wich the buffer should be returned
  | message | : the pointer to the data buffer to be filled
  | message_length | : at entry, the size in number of bytes of the allocated empty message. At exist, the actual message length in number of bytes

Returns:
  0 if OK, integer value on error