Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
[Function Discovery is available for use in the following versions of Windows: Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, and Windows Vista. It may be altered or unavailable in subsequent versions.]
The Function Discovery sample demonstrates the use of Function Discovery API. The source code for the sample can be found in the SDK installation location under C:\Program Files\Microsoft SDKs\Windows\<version number>\Samples\winbase\DeviceFoundation\FunctionDiscovery\Client. The Windows Vista SDK is available from the Download Center.
The Function Discovery sample performs the following tasks:
- Queries the PnP provider for function instances. The IFunctionDiscovery::CreateInstanceCollectionQuery and IFunctionInstanceCollectionQuery::Execute methods are used.
- Displays the list of PnP devices available on the machine. The GetCount and Item methods of the IFunctionInstanceCollection interface are used.
- Displays the metadata associated with the device. The IFunctionInstance::OpenPropertyStore method is used.
- Handles PnP notifications. The OnUpdate, OnError, and OnEvent methods of the IFunctionDiscoveryNotification interface are implemented.
Related topics