The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PnpObject.CreateWatcher(PnpObjectType, IIterable(String)) | createWatcher(PnpObjectType, IIterable(String)) method

Applies to Windows and Windows Phone

Returns a PnpObjectWatcher object that is used to enumerate the PnP objects in the collection using events.


var pnpObjectWatcher = Windows.Devices.Enumeration.Pnp.PnpObject.createWatcher(type, requestedProperties);



Type: PnpObjectType

The type of the PnpObject.


Type: IIterable<String> [JavaScript/C++] | System.Collections.Generic.IEnumerable<String> [.NET]

An iterable list of additional properties to include in the Properties property of the PnpObject objects included in enumeration results. For more info on what the properties represent, see the list of properties in How to retrieve additional properties for a device or PnP object.

Return value

Type: PnpObjectWatcher

A PnpObjectWatcher object used to enumerate the collection by registering event notification delegates and by issuing start and stop event notifications.


CreateWatcher is a primary starting point method for enumerating device objects. A client should use this API to enumerate PnpObjects if they want the enumeration to happen incrementally, or if they want the results to be updated as things change. For example, if a PnpObject is added, removed or its properties are updated, the client will register event handlers with the returned watcher object to receive the enumerated PnpObject as well as the later updates.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Devices::Enumeration::Pnp [C++]



See also

CreateWatcher(PnpObjectType, IIterable_1, String)
How to retrieve additional properties for a device or PnP object



© 2014 Microsoft