API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IBATTERY_QUERYINTERFACE()

Brew Release
Brew MP 1.0.2
Description

This method retrieves a pointer to an interface conforming to the definition of the specified class ID. This can be used to query for extended functionality, like future versions or proprietary extensions.
Upon a successful query, the interace is returned AddRef'ed. The caller is responsible for calling Release() at some point in the future. One exception is when the pointer returned is not an interface pointer. In that case, the memory will share the lifetime of the object being queried, and the returned pointer will not be used to free or release the object.
Params
po
[in]:
Pointer to IBattery interface.
id
[in]:
A globally unique id to identify the entity (interface or data) that we are trying to query.
p
[out]:
Pointer to the data or interface that we want to retrieve. If the interface is not available, this is set to NULL.
Interface
  • IBATTERY
Prototype
  •    int IBATTERY_QueryInterface(IBattery *po, AEECLSID id, void **p)
    
Return

  • Return SUCCESS on success, ECLASSNOTSUPPORT if class ID not supported
Side Effect
  • None
Comments
On failure, QueryInterface() must set *p to NULL.