Constraint Definitions
[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Most built-in providers support only a subset of the constraints defined below. For general information about query constraints, see Constraints.
The following are common constraints and values.
-
FD_CONSTRAINTVALUE_RECURSESUBCATEGORY_TRUE
-
-
L"TRUE"
-
Queries should be recursive if the provider supports subcategories.
-
-
FD_CONSTRAINTVALUE_VISIBILITY_ALL
-
-
L"1"
-
Query for all instances, including hidden instances.
-
-
FD_CONSTRAINTVALUE_VISIBILITY_DEFAULT
-
-
L"0"
-
Query for visible instances.
-
-
FD_QUERYCONSTRAINT_COMCLSCONTEXT
-
-
L"COMClsContext"
-
Specifies whether the provider used for the query should be launched inside of the caller's process or outside of the caller's process. A constraint value of FD_QUERYCONSTRAINT_COMCLSCONTEXT_INPROC_SERVER or FD_QUERYCONSTRAINT_COMCLSCONTEXT_LOCAL_SERVER must be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
By default, queries for SSDP devices, WSD devices, and devices discovered using a custom provider will be launched outside of the caller's process.
-
-
FD_CONSTRAINTVALUE_COMCLSCONTEXT_INPROC_SERVER
-
-
L"1"
-
The provider used to execute the query will be launched inside of the caller's process.
-
-
FD_CONSTRAINTVALUE_COMCLSCONTEXT_LOCAL_SERVER
-
-
L"4"
-
The provider used to execute the query will be launched outside of the caller's process.
This constraint is ignored for the NetBIOS, WCN, PnP, and Registry providers. These providers are always loaded inside the caller's process.
-
-
FD_QUERYCONSTRAINT_PROVIDERINSTANCEID
-
-
L"ProviderInstanceID"
-
Query for instances with the specified provider identifier.
-
-
FD_QUERYCONSTRAINT_RECURSESUBCATEGORY
-
-
L"RecurseSubcategory"
-
Indicates whether queries should be recursive if the provider supports subcategories. See FD_CONSTRAINTVALUE_RECURSESUBCATEGORY_TRUE.
-
-
FD_QUERYCONSTRAINT_SUBCATEGORY
-
-
L"Subcategory"
-
Query for instances with the specified subcategory.
-
-
FD_QUERYCONSTRAINT_VISIBILITY
-
-
L"Visibility"
-
Query for instances based on visibility.
-
-
FD_QUERYCONSTRAINT_ROUTINGSCOPE
-
-
L"RoutingScope"
-
Specifies whether the provider should be used to search for resources that can be contacted through provider-specific discovery infrastructure. One of the following values must be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
-
FD_CONSTRAINTVALUE_ROUTINGSCOPE_ALL (L"All")
-
The provider can rely on discovery infrastructure to find remote resources.
-
FD_CONSTRAINTVALUE_ROUTINGSCOPE_DIRECT (L"Direct")
-
The provider can search only for resources that can be directly contacted.
-
The following constraints and values are specific to NetBIOS.
-
PROVIDERWNET_QUERYCONSTRAINT_PROPERTIES
-
-
L"Properties"
-
Specifies the properties in the property store to be populated from the NETRESOURCE structure supplied by the NetBIOS provider. A constraint value of WNET_CONSTRAINTVALUE_PROPERTIES_ALL or WNET_CONSTRAINTVALUE_PROPERTIES_LIMITED should be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
If this constraint is not specified, then a default value of WNET_CONSTRAINTVALUE_PROPERTIES_LIMITED is used.
-
-
PROVIDERWNET_QUERYCONSTRAINT_RESOURCETYPE
-
-
L"ResourceType"
-
Specifies the resource types to be queried. A constraint value of WNET_CONSTRAINTVALUE_RESOURCETYPE_DISK, WNET_CONSTRAINTVALUE_RESOURCETYPE_DISKORPRINTER, or WNET_CONSTRAINTVALUE_RESOURCETYPE_PRINTER should be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
This constraint is not used by default.
-
-
PROVIDERWNET_QUERYCONSTRAINT_TYPE
-
-
L"Type"
-
Specifies the resource display types to be queried. A constraint value of WNET_CONSTRAINTVALUE_TYPE_ALL, WNET_CONSTRAINTVALUE_TYPE_DOMAIN, or WNET_CONSTRAINTVALUE_TYPE_SERVER should be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
If this constraint is not specified, then a default value of WNET_CONSTRAINTVALUE_TYPE_SERVER is used.
-
-
WNET_CONSTRAINTVALUE_PROPERTIES_ALL
-
-
L"All"
-
All properties in the property store are populated from the NETRESOURCE structure supplied by the NetBIOS provider.
-
-
WNET_CONSTRAINTVALUE_PROPERTIES_LIMITED
-
-
L"Limited"
-
Only the PKEY_WNET_DisplayType and PKEY_WNET_Comment property keys are populated from the NETRESOURCE structure supplied by the NetBIOS provider.
-
-
WNET_CONSTRAINTVALUE_TYPE_ALL
-
-
L"All"
-
Query all resources discoverable by the NetBIOS provider.
-
-
WNET_CONSTRAINTVALUE_TYPE_DOMAIN
-
-
L"Domain"
-
Query only the resources with a display type less than or equal to RESOURCEDISPLAYTYPE_DOMAIN. Services, files, and printers are not queried. For more information, see NETRESOURCE.
-
-
WNET_CONSTRAINTVALUE_TYPE_SERVER
-
-
L"Server"
-
Query only the resources with a display type less than or equal to RESOURCEDISPLAYTYPE_Server. Files and printers are not queried. For more information, see NETRESOURCE.
-
-
WNET_CONSTRAINTVALUE_RESOURCETYPE_DISK
-
-
L"Disk"
-
Query the disk shares. A disk share is a resource with a display type of RESOURCEDISPLAYTYPE_SHARE and a resource type of RESOURCETYPE_DISK. For more information, see NETRESOURCE.
-
-
WNET_CONSTRAINTVALUE_RESOURCETYPE_DISKORPRINTER
-
-
L"DiskOrPrinter"
-
Query the disk and printer shares. Disk and printer shares are resources with a display type of RESOURCEDISPLAYTYPE_SHARE. For more information, see NETRESOURCE.
-
-
WNET_CONSTRAINTVALUE_RESOURCETYPE_PRINTER
-
-
L"Printer"
-
Query the printer shares. A printer share is a resource with a display type of RESOURCEDISPLAYTYPE_SHARE and a resource type of RESOURCETYPE_PRINTER. For more information, see NETRESOURCE.
-
The following constraints and values are specific to PnP.
-
PNP_CONSTRAINTVALUE_NOTPRESENT
-
-
L"TRUE"
-
Query for instances that are not present, in addition to present instances. A not present instance is a PnP function instance that was once available on your computer but is no longer available for use.
-
-
PNP_CONSTRAINTVALUE_NOTIFICATIONSONLY
-
-
L"TRUE"
-
A query will send the appropriate notification to the IFunctionDiscoveryNotification object, and not populate the instance collection.
-
-
PROVIDERPNP_QUERYCONSTRAINT_INTERFACECLASS
-
-
L"InterfaceClass"
-
Query for devnode function instances that have a corresponding interface instance which implements the specified interface.
-
-
PROVIDERPNP_QUERYCONSTRAINT_NOTIFICATIONSONLY
-
-
L"NotifyOnly"
-
Queries will not populate the IFunctionInstanceCollection passed into the IFunctionInstanceCollectionQuery::Execute method, but will send appropriate notifications to the IFunctionDiscoveryNotification object. See PNP_CONSTRAINTVALUE_NOTIFICATIONSONLY.
-
-
PROVIDERPNP_QUERYCONSTRAINT_NOTPRESENT
-
-
L"NotPresent"
-
Indicates whether or not queries should return not present instances. See PNP_CONSTRAINTVALUE_NOTPRESENT.
If this constraint is not specified, then by default only present instances are returned.
-
The following constraints and values are specific to SSDP.
-
PROVIDERSSDP_QUERYCONSTRAINT_TYPE
-
-
L"Type"
-
Query for SSDP devices of particular type. One of the SSDP constraint values specified below should be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
-
-
SSDP_CONSTRAINTVALUE_TYPE_ALL
-
-
L"ssdp:all"
-
Query for all SSDP devices and services.
-
-
SSDP_CONSTRAINTVALUE_TYPE_ROOT
-
-
L"upnp:rootdevice"
-
Query for UPnP root devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEVICE_PREFIX
-
-
L"urn:schemas-upnp-org:device:"
-
Query for UPnP devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_SVC_PREFIX
-
-
L"urn:schemas-upnp-org:service:"
-
Query for UPnP services.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_IGD
-
-
L"urn:schemas-upnp-org:device:InternetGatewayDevice:1"
-
Query for UPnP internet gateway devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_LANDEVICE
-
-
L"urn:schemas-upnp-org:device:LANDevice:1"
-
Query for UPnP LAN devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_LIGHTING
-
-
L"urn:schemas-upnp-org:device:Lighting:1"
-
Query for UPnP lighting devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_LUXMETER
-
-
L"urn:schemas-upnp-org:device:Luxmeter:1"
-
Query for UPnP luxometers.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_MDARNDR
-
-
L"urn:schemas-upnp-org:device:MediaRenderer:1"
-
Query for UPnP media renderers.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_MDASRVR
-
-
L"urn:schemas-upnp-org:device:MediaServer:1"
-
Query for UPnP media servers.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_POWERDEVICE
-
-
L"urn:schemas-upnp-org:device:PowerDevice:1"
-
Query for UPnP power devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_REMINDER
-
-
L"urn:schemas-upnp-org:device:Reminder:1"
-
Query for UPnP reminder devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_WANDEVICE
-
-
L"urn:schemas-upnp-org:device:WANDevice:1"
-
Query for UPnP WAN devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_DEV_WANCONNDEVICE
-
-
L"urn:schemas-upnp-org:device:WANConnectionDevice:1"
-
Query for UPnP WAN connection devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_SVC_DIMMING
-
-
L"urn:schemas-upnp-org:service:DimmingService:1"
-
Query for UPnP dimming service devices.
-
-
SSDP_CONSTRAINTVALUE_TYPE_SVC_SCANNER
-
-
L"urn:schemas-upnp-org:service:Scanner:1"
-
Query for UPnP scanners.
-
The following constraints and values are specific to WSD.
-
PROVIDERWSD_QUERYCONSTRAINT_DIRECTEDADDRESS
-
-
L"RemoteAddress"
-
Query for a WSD device discovered by directed discovery at a specified address. A string representing the device address should be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
-
-
PROVIDERWSD_QUERYCONSTRAINT_SCOPE
-
-
L"Scope"
-
Not implemented.
-
-
PROVIDERWSD_QUERYCONSTRAINT_TYPE
-
-
L"Type"
-
Query for WSD devices of particular type. A string representing the device type to query should be passed to the pszConstraintValue parameter of the AddQueryConstraint method. The string must be a URI that specifies the namespace and the type.
For example, to query for WSD devices of type "IBlinds" defined in the namespace "http://www.fabrikam.com/remotecontrolhome/Multi", pass the string "http://www.fabrikam.com/remotecontrolhome/Multi/IBlinds" to pszConstraintValue.
-
-
PROVIDERWSD_QUERYCONSTRAINT_SSL_CERT_FOR_CLIENT_AUTH
-
-
L"SSLClientAuthCert"
-
Specifies what client authentication certificate should be used for an HTTPS connection to a device that requires client authentication. The constraint value passed through the pszConstraintValue parameter of the AddQueryConstraint method must be a BASE-64-encoded value of the SHA1 hash of the certificate. The caller needs to have read access to the private key of this client certificate. This query constraint can be used only if the WSD provider is launched inside of the caller s process (see FD_QUERYCONSTRAINT_COMCLSCONTEXT).
-
-
PROVIDERWSD_QUERYCONSTRAINT_SECURITY_REQUIREMENTS
-
-
L"SecurityRequirements"
-
Query for devices based on their security capabilities. One of the following values must be passed to the pszConstraintValue parameter of the AddQueryConstraint method.
-
WSD_CONSTRAINTVALUE_REQUIRE_SECURECHANNEL (L"1")
-
Only devices that support HTTPS endpoints for metadata transfer and service messaging will be discovered.
-
WSD_CONSTRAINTVALUE_REQUIRE_SECURECHANNEL_AND_COMPACTSIGNATURE (L"2")
-
Only devices that both sign their discovery messages using the compact signature format and use HTTPS endpoints for metadata transfer and service messaging will be discovered.
-
Requirements
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|