|
CTNotification<T> Class Overview template <class TOleDBProClass,
class INotifyImp> Notifications permit consumers to be informed of changes to an OLEDB object, which may be shared by multiple consumers. OLEDB notification is clearly described in the Chapter 12 of OLE DB Programmer Reference in the platform SDK/MSDN. To correctly use OLEDB notifications, you must understand a set of concepts, such as the state of a shared object, how to nest and group notifications, and how to filter out unwanted notifications. OLEDB notification is very useful when multiple threads are involved, because it makes communication among multiple threads in the standard COM way. OleDBPro provides the template CNotification to simplify the use of OLEDB notification interfaces including IRowsetNotify, IDBAsynchNotify, IRowPositionChange (MS Data Service) and ITransactionOutcomeEvents. TOleDBProClass can be any one of CODataSource, COSession, CRBase, CORow and COStream based classes or templates. Template parameter INotifyImp must be implemented from one of the above four sink interfaces by a caller. For how to use the template, see the example AsyNotify. |