# GigE Vision Events

**URL:** <https://forum.commonvisionblox.com/t/gige-vision-events/190>\
**Category:** C-style API\
**Tags:** acquisition, genicam, gigevision, c\
**Created:** [August 4, 2017, 8:24am UTC](https://forum.commonvisionblox.com/t/gige-vision-events/190 "2017-08-04T08:24:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)\
**Post date:** [August 7, 2017, 8:13am UTC](https://forum.commonvisionblox.com/t/gige-vision-events/190/2 "2017-08-07T08:13:41Z")

</div>

Hi @Theo,

I will reply in two steps. In this post I describe the prefered way (GenApi). Use this if the camera supports it.

As per your example I assume you got the `Cust::EventLine5PulseStartTimestamp` node via the camera’s device node map (`NMHGetNodeMap` and then `NMGetNode`). First we need the call back function that is called every time the node changes (in this case when a new GEV Event arrived):

```auto
void __stdcall Line5PulseStart(NODE Node, void *pPrivate);

```

Then you can call this code to register this callback :

```auto
  NODE hLine5PulseStartTimestamp = /* get Cust::EventLine5PulseStartTimestamp node handle as described */;

  NODECALLBACK unregisterToken = NULL;
  cvbres_t result = NRegisterUpdate(hLine5PulseStartTimestamp, &Line5PulseStart, NULL, unregisterToken);
  if(result < 0)
    ; // error handling

```

Instead of the `NULL` in the register function, you can also give it a pointer to something that brings you back to your context (e.g. a class’ `this` pointer).

### Important Note

The `hLine5PulseStartTimestamp` `NODE` object stores the `Line5PulseStart` callback function. If you release the `hLine5PulseStartTimestamp` via `ReleaseObject`, the also the callback is gone. Thus keep the `hLine5PulseStartTimestamp` object alive as long as you need the callback.

> **Why is this preferred?**
>
> The _GenICam Standard Features Naming Convention_ only standardizes the _names_, not the numeric values. Thus the vendors are free to change the numeric event IDs as they see fit. This normaly only happens between vendors or device series, but we have also see them change due to firmware updates. Names are safer because of the standard.

---

_[View the full topic](https://forum.commonvisionblox.com/t/gige-vision-events/190)._
