ThingWorx Edge C SDK > Running the C SDK > Creating a Bind Event Handler (Optional)
  
Creating a Bind Event Handler (Optional)
You may want to track exactly when your edge entities are successfully bound to or unbound from ThingWorx platform. The reason for this is that only bound items should be interacting with ThingWorx platform and it will never forward a request to a corresponding remote thing in its database when the request is targeted at an entity that is not bound.
/* Register a bind event handler */
/* Callbacks only when thingName is bound/unbound */
twApi_RegisterBindEventCallback(thingName, BindEventHandler, NULL);

/* First NULL says "tell me about all things that are bound */

/* twApi_RegisterBindEventCallback(NULL, BindEventHandler, NULL