IObjectStoreItem::Initialize

The Initialize method initializes the ObjectStoreItem component by specifying the object store item type, name, version series ID, and version ID for use by a number of command components.

void spIObjectStoreItem->Initialize(ItemType enItemType,
                                    _bstr_t bstrObjectStoreName,
                                    _bstr_t bstrVersionSeriesID,
                                    _bstr_t bstrVersionID);
Parameters
enItemType - [in] Required ItemType enumeration, which specifies the object store item's type, which can be set to one of the following:
- eItemTypeDocument
- eItemTypeFolder
- eItemTypeOther
bstrObjectStoreName - [in] Required _bstr_t, which specifies the object store name.
bstrVersionSeriesID - [in] Required _bstr_t, which specifies the object store item's version series ID (GUID).
bstrVersionID - [in] Required _bstr_t, which specifies a GUID of a specific version ID for the object store item. The GUID value must be specified when using any command except Download, and must also be used when creating links for the Add and AddViaTemplate commands. When using the Download command, the following values may also be specified:
- the special name string "release", for the latest released version of the object store item.
- the special name string "current", for the latest version of the object store item.
- the special name string "reservation", for the current version of the reservation object for the object store item.

Results
This method always returns an HRESULT value of S_OK if successful.
Sample
The following is a fragment from the complete example for the IObjectStoreItem interface.
   ...
   // Initialize the ObjectStoreItem component with
   // the items' type, name, version series ID and version ID.
   ItemType eItemType = eItemTypeDocument;
   _bstr_t bstrObjectStoreName = (_T("Alaska"));
   _bstr_t bstrVersionSeriesID = (_T("{2400406D-68FE-4d5c-81FD-AC01F7186119}"));
   _bstr_t bstrVersionID = (_T("{6D770D89-497C-40be-B300-E646FC12DE8A}"));
   std::cout << "Initializing the ObjectStoreItem component..." << std::endl;
spIObjectStoreItem1->Initialize(eItemType, bstrObjectStoreName, bstrVersionSeriesID, bstrVersionID); ...