
TFunctionDiscoveryOnEvent = procedure(dwEventID: DWORD fdqcQuer圜ontext: FDQUERYCONTEXT pszProvider: PWCHAR) of object TFunctionDiscoveryOnError = procedure(hr: HRESULT fdqcQuer圜ontext: FDQUERYCONTEXT pszProvider: PWCHAR) of object PIFunctionInstance: IFunctionInstance) of object TFunctionDiscoveryOnUpdate = procedure(enumQueryUpdateAction: QueryUpdateAction fdqcQuer圜ontext: FDQUERYCONTEXT Now check this Delphi implementation for the IFunctionDiscoveryNotification interface. IFunctionDiscoveryNotification = interface(IUnknown)įunction OnUpdate(enumQueryUpdateAction: QueryUpdateAction fdqcQuer圜ontext: FDQUERYCONTEXT pIFunctionInstance: IFunctionInstance): HRESULT stdcall įunction OnError(hr: HRESULT fdqcQuer圜ontext: FDQUERYCONTEXT pszProvider: PWCHAR): HRESULT stdcall įunction OnEvent(dwEventID: DWORD fdqcQuer圜ontext: FDQUERYCONTEXT pszProvider: PWCHAR): HRESULT stdcall

This is the Delphi declaration of the IFunctionDiscoveryNotification interface. Indicates that a function instance has been added, removed, or changed.
#DELPHI XE3 ACTIVATOR UPDATE#
Receives any add, remove, or update events. Receives errors that occur during asynchronous query processing. The IFunctionDiscoveryNotification interface exposes 3 methods to receive the results of the asynchronous queries returned by the execution of the IFunctionInstanceCollectionQuery.Execute method. Implementing the IFunctionDiscoveryNotification interface In order to receive such notifications you must implement the IFunctionDiscoveryNotification interface and pass a instance of this implementation to the CreateInstanceCollectionQuery method, then you must restrict the result of the query with the method AddQuer圜onstraint passing the PROVIDERPNP_QUERYCONSTRAINT_NOTIFICATIONSONLY value to only receive notifications and finally call the IFunctionInstanceCollectionQuery.Execute method. The Function Discovery API can be used not just for enumerate devices also you can receive notifications as well, like when a device is added, removed or a property of the device is modified. This is the part 3 of the Exploring Delphi XE3 – WinApi Additions – Winapi.Functiondiscovery Article.
