次の方法で共有


XRPtr<Interface>::Attach(Interface,bool) (Compact 2013)

3/28/2014

This method encapsulates a raw interface pointer in this smart pointer's type.

Syntax

void Attach(
    Interface* pInterface, 
    bool fAddRef
)

Parameters

  • pInterface
    [in] A raw interface pointer to a XAML for Windows Embedded object.
  • fAddRef
    [in] Boolean that indicates whether to increment the reference count by calling IUnknown::AddRef. If it is true, then AddRef is called. If it is false, the smart pointer takes ownership of the raw interface pointer without calling AddRef.

Return Value

None.

Remarks

This method releases any previously acquired interface.

Requirements

Header

XRPtr.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XRPtr<Interface>::Attach
XRPtr<Interface>