The first kind of provider event is called an asynchronous event, the second kind is called a completion event, and the third kind is called a miscellaneous event. In this book, the term event refers to a provider event, except where noted otherwise. A provider uses asynchronous events to notify your application that data has arrived or that a request for a connection or disconnection is pending. XTI does not define completion events. A provider uses completion events to notify your application that an asynchronous function has finished executing.
Some functions are inherently synchronous and have no corresponding completion event.
For example, if an endpoint provider is in asynchronous mode and you execute the OTGetEndpointState function, the function returns information about the state of the endpoint immediately. The description of a function indicates whether the function behaves differently in asynchronous mode. A provider event is identified by a provider event code. These are listed and described in the event codes enumeration . In general, to receive notice of provider events, you must provide a notifier function and install it for the provider.