### Constructor

# Gio DBusMessage new_from_blob

since: 2.26

#### Declaration [src]

    GDBusMessage*
    g_dbus_message_new_from_blob (
      guchar* blob,
      gsize blob_len,
      GDBusCapabilityFlags capabilities,
      GError** error
    )

#### Description [src]

Creates a new `GDBusMessage` from the data stored at `blob`. The byte order that the message was in can be retrieved using g_dbus_message_get_byte_order().

If the `blob` cannot be parsed, contains invalid fields, or contains invalid headers, `G_IO_ERROR_INVALID_ARGUMENT` will be returned.

Available since: 2.26

#### Parameters

`blob`

  Type: An array of `guint8`

  A blob representing a binary D-Bus message.

  The length of the array is specified in the `blob_len` argument.
  The data is owned by the caller of the function.

`blob_len`

  Type: `gsize`

  The length of `blob`.

`capabilities`

  Type: `GDBusCapabilityFlags`

  A `GDBusCapabilityFlags` describing what protocol features are supported.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the constructor if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GDBusMessage`

A new `GDBusMessage` or `NULL` if `error` is set. Free with g_object_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.