---
name: "gicFeatureAttachAction"
section: "3"
platform: "linux"
package: "libgiigic1-dev"
version: "1.1.2-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/gicFeatureAttachAction"
---

# gicFeatureAttachAction(3)

Bind Features and Actions

## NAME

**gicFeatureAttachAction**, **gicFeatureDetachAction**, **gicFeatureWrite**, **gicFeatureRead** - Bind Features and Actions

## SYNOPSIS

```
#include <ggi/gic.h>
int gicFeatureAttachAction(gic_handle_t hand,
      gic_feature *feature,
      void (*action)(gic_handle_t hand, gic_actionlist *action,
              gic_feature *feature,gic_state newstate,
              gic_flag flag,int recnum),
      void *privdata, char *name);
int gicFeatureDetachAction(gic_handle_t hand,
      gic_feature *feature,
      void (*action)(gic_handle_t hand, gic_actionlist *action,
              gic_feature *feature,gic_state newstate,
              gic_flag flag,int recnum),
      void *privdata, char *name);
```

## DESCRIPTION

**gicFeatureAttachAction()** and **gicFeatureDetachAction()** are used to bind an action (i.e. a callback function) to a feature. This is usually handled by higher layers, which map whole sets of actions using a gic\_actionlist.

## RETURN VALUE

**gicFeatureAttachAction()** and **gicFeatureDetachAction()** return 0 on success and an `gii-error(3)` code on failure.

## SEE ALSO

TODO
