Partager via


XRObject.CreateInstance(Base * *) (Compact 7)

3/12/2014

This method converts the specified object of the type Base into an XRObject<Base> instance that also supports functionality that resembles the Component Object Model (COM).

Syntax

HRESULT CreateInstance(
Base * * ppBase)

Parameters

  • ppBase
    [in/out] Pointer to a custom object type that, on return, represents an XRObject<Base> object instance that supports COM functionality.

Return Value

The following table shows the possible return values.

Value Description

S_OK

The method succeeded.

E_FAIL

The method was not successful.

E_OUTOFMEMORY

Exceeded available memory.

E_POINTER

The method’s internal call to XRObject.CreateInstance(XRObject<Base> * *) failed with the internal object pointer.

E_INVALIDARG

The ppBase parameter is not valid.

Remarks

The Base object type is defined in the Base template parameter of XRObject<Base>.

This is the version of the CreateInstance method that doesn't require the UUID of the object in Base, in contrast to the XRObject.CreateInstance(XRObject<Base> * *) method.

Requirements

Header

XRUnknown.h

See Also

Reference

XRObject<Base>