Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The AddQueryConstraint method adds a query constraint to the query.
This method enables the application to filter the result set to only those instances that fulfill this constraint.
HRESULT AddQueryConstraint(
[in] const WCHAR *pszConstraintName,
[in] const WCHAR *pszConstraintValue
);
[in] pszConstraintName
The query constraint.
[in] pszConstraintValue
The constraint value.
Possible return values include, but are not limited to, the following.
Return code | Description |
---|---|
|
The method completed successfully. |
|
The method is unable to allocate the memory required to perform this operation. |
If multiple constraints are added, all constraints must be supported to satisfy the query.
AddQueryConstraint will fail with an error if the IFunctionInstanceCollectionQuery object includes all subcategories and the AddQueryConstraint method is called with the pszConstraintName parameter set to FD_QUERYCONSTRAINT_PROVIDERINSTANCEID. To avoid this error, create a IFunctionInstanceCollectionQuery object that does not include all subcategories. You can create such an object by calling CreateInstanceCollectionQuery with the fIncludeAllSubCategories parameter set to false.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | functiondiscoveryapi.h |
DLL | FunDisc.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today