Compartilhar via


CBasePropertyPage::OnConnect (Compact 2013)

3/26/2014

This method provides an IUnknown pointer to the object associated with the property page.

Syntax

virtual HRESULT OnConnect(
  IUnknown* pUnknown
);

Parameters

  • pUnknown
    Pointer to the IUnknown interface of the object.

Return Value

The base-class implementation returns S_OK.

Remarks

The CBasePropertyPage::SetObjects method calls the CBasePropertyPage::OnConnect method. Override this method to store a pointer to the object specified by pUnknown. You can either store the pUnknown pointer itself, or query that pointer for other interfaces. If you store the pUnknown pointer, call IUnknown::AddRef before CBasePropertyPage::OnConnect returns.

In the CBasePropertyPage::OnActivate method, use the stored pointer (or pointers) to retrieve initial values for the dialog properties. In the CBasePropertyPage::OnApplyChanges method, apply any changes back to the object. Release all pointers in the CBasePropertyPage::OnDisconnect method.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBasePropertyPage Class