Share via


ICcObjectContainer::AddObject (Compact 2013)

3/26/2014

Deprecated.

This method adds a new Core Connectivity object to the current container.

In Windows Embedded Compact 2013, CoreCon HLAPI has been deprecated.

Syntax

HRESULT AddObject(
  BSTR in_bstrName,
  BSTR in_bstrID,
  ICcObject** out_ppiObject
);

Parameters

  • in_bstrName
    [in] Name of the object.
  • in_bstrID
    [in] ID of the object.
  • out_ppiObject
    [out, retval] Pointer to the newly created object.

Return Value

Value

Description

S_OK

A new object is created through the out parameter.

E_INVALIDARG

Invalid arguments.

The strings must be non-NULL.

The out parameter must be non-NULL.

E_DUPLICATE

An object with the same ID exists in the container.

E_FAIL

The return value for any other failure.

E_OUTOFMEMORY

The method could not allocate the bstr parameterin_bstrID, or in_bstrName.

E_DATASTORE_XMLTEXT

An input parameter, not XML text.

E_DATASTORE_TYPEERROR

A datastore internal type error.

Remarks

You can use a query interface with out_ppiObject to find an appropriate Core Connectivity datastore interface.

For example, the ICcDeviceContainer interface can only add ICcDevice objects.

Requirements

Header

ccdatastore.h

See Also

Reference

ICcObjectContainer
Core Connectivity Interfaces