XRObservableCollection.CreateInstance(XRObservableCollection * *) (Compact 7)
3/12/2014
This method returns an XRObservableCollection<ItemType> object instance that also supports functionality that resembles the Component Object Model (COM) and exposes interfaces defined in the interface map to callers of XRObject.QueryInterface(const IID&,void * *).
Syntax
HRESULT CreateInstance(
XRObservableCollection * * ppCollection)
Parameters
- ppCollection
[out] A pointer to an XRObservableCollection<ItemType> object instance.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
The method was successful. |
E_FAIL |
The method was unsuccessful. |
E_OUTOFMEMORY |
The method exceeded its available memory. |
E_POINTER |
The ppCollection parameter is not valid. |
The E_OUTOFMEMORY value is returned when the system does not have enough memory to create an object instance.
The E_OUTOFMEMORY and E_FAIL values are returned in two different situations:
- E_OUTOFMEMORY is returned if the method was able to process the ppCollection input parameter for the internal call to create an instance; however, the method was unable to create the instance by using the input parameter.
- E_FAIL is returned by the method’s internal call to create an instance if none of its
if
statements were evaluated by the method. When E_FAIL is returned, none of the code in the internal call to create an instance was processed.
Remarks
In addition to the methods on XRObservableCollection<ItemType>, the object instance in ppCollection supports the methods XRObject.QueryInterface(const IID&,void * *), XRObject.AddRef, and XRObject.Release. It also supports the following interfaces for callers of XRObject.QueryInterface(const IID&,void * *):
For more information about the interface map, see Remarks in XRObservableCollection<ItemType>.
This method uses the XRObject<Base> helper class to create the object instance.
Requirements
Header |
XRCollection.h |