Writing WMI providers FAQ series – 2 – When a provider doesn’t support enumeration what will be the impact for the WMI consumer?

The aim of the series is to cover a WMI Provider writing question  per post. If you have a question, you’d like the WMI team to answer, do leave a comment.

Now, for the answer –  

If the WMI client requests to enumerate all instances of a class supported by such a provider, a return code WBEM_NOT_CAPABLE will be returned.

 If the WMI client performs a query on a class supported by that provider and if that provider doesn’t have the query capability, then the query will fail because WMI uses the enumeration technique with post-filtering to provide the query results. However, if the query capability is supported by the provider, then the query will succeed because WMI will pass that query to the provider and the provider will handle it accordingly.

 Kapil Mathur [MSFT]


Comments (3)

  1. Ande says:

    This does not, repeat NOT, work on vista 64 bit

  2. kmathur says:

    Could you give us some more details of your experience? Did you implement query capability in your provider which did not work?

  3. creid says:

    Could you please write a post on how to create a new WMI class and specify that class with variables?