ThingWorx Edge C SDK > How to Set Up an Application > Binding Your Entities > 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. In addition, the platform will never forward a request to a corresponding Remote Thing in its database when the request targets 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
Was this helpful?