Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[The feature associated with this page, Custom File and Stream Handlers, is a legacy feature. It has been superseded by MediaStreamSource class. MediaStreamSource class has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaStreamSource class instead of Custom File and Stream Handlers, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The QueryInterface method lets an application query an object to determine which interfaces it supports. The sample application sets the ppv pointer to the current interface.
STDMETHODIMP CAVIFileCF::QueryInterface(
const IID FAR& iid,
void FAR* FAR* ppv)
{
if (iid == IID_IUnknown)
*ppv = this; // set the interface pointer
// to this instance
else if (iid == IID_IClassFactory)
*ppv = this; // second chance to set the
// interface pointer to this
// instance
else
return ResultFromScode(E_NOINTERFACE);
AddRef(); //Increment the reference count
return NULL;
}
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!