IFunctionDiscoveryNotification interface

[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

This interface is implemented by the client program to support asynchronous queries and is called by Function Discovery to notify the client program when a function instance that meets the query parameters has been added or removed.

Members

The IFunctionDiscoveryNotification interface inherits from the IUnknown interface. IFunctionDiscoveryNotification also has these types of members:

Methods

The IFunctionDiscoveryNotification interface has these methods.

MethodDescription
OnError

Receives errors that occur during asynchronous query processing.

OnEvent

Receives any add, remove, or update events.

OnUpdate

Indicates that a function instance has been added, removed, or changed.

 

Remarks

This interface must be implemented by the client program in order to receive notifications from Function Discovery. The address of the client program's implementation is passed to one of the query methods to enable notifications for function instances which meet the query parameters.

Function Discovery calls the client program's IFunctionDiscoveryNotification::OnUpdate method to perform the actual notification, which is generated for a function instance when it is added or removed.

Note  Some Function discovery providers will also generate a notification when a function instance is modified by changing a category or one or more properties assigned to it.
 

Examples

The examples that appear on individual method pages are based on the following class declaration.

class CMyNotificationListener : public CFunctionDiscoveryNotificationWrapper
{
public:
    CMyNotificationListener() {
        m_hAddEvent      = CreateEvent( NULL, FALSE, FALSE, NULL );
        m_hRemoveEvent   = CreateEvent( NULL, FALSE, FALSE, NULL );
        m_hChangeEvent   = CreateEvent( NULL, FALSE, FALSE, NULL );
    }

    ~CMyNotificationListener() {
        CloseHandle( m_hAddEvent );
        CloseHandle( m_hRemoveEvent );
        CloseHandle( m_hChangeEvent );
    }
        

private:
    HANDLE m_hAddEvent, m_hRemoveEvent, m_hChangeEvent;
};

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

FunctionDiscoveryNotification.h

IDL

FunctionDiscoveryAPI.idl

 

 

Community Additions

ADD
Show: