[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Indicates that a function instance has been added, removed, or changed. This method is implemented by the client program and is called by Function Discovery.
HRESULT OnUpdate( QueryUpdateAction enumQueryUpdateAction, FDQUERYCONTEXT fdqcQueryContext, IFunctionInstance *pIFunctionInstance );
A QueryUpdateAction value that specifies the type of action Function Discovery is performing on the specified function instance.
The context registered for change notification. The type FDQUERYCONTEXT is defined as a DWORDLONG. This parameter can be NULL.
An IFunctionInstance interface pointer that represents the function instance being affected by the update.
The client program's implementation of the OnUpdate method should return one of the following HRESULT values to the caller.
||The method completed successfully.|
||The value of one of the input parameters is invalid.|
Do not call Release on the query object from this method. Doing so could cause a deadlock. If Release is called on a query object from another thread while a callback is in process, the object will not be released until the callback has finished.
All notifications passed to Function Discovery by providers are queued and returned to the client one by one. Callbacks are synchronized so that a client will only receive one notification at a time.
Because other IFunctionDiscoveryNotification method calls may be made in other threads, any changes made to the thread state during the call must be restored before exiting the method.
The following code shows an OnUpdate handler implementation. The CMyNotificationListener class is defined in the IFunctionDiscoveryNotification topic.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|