GetItemIndexFromOid (Compact 7)
3/12/2014
The GetItemIndexFromOid function returns the index of the item in the collection for the given OID.
Syntax
HRESULT GetItemIndexFromOid(
IPOutlookItemCollection * pItems,
CEOID oidPIM,
DWORD * pdwIndex
);
Parameters
Parameter | Description |
---|---|
pItems |
[in] Reference to a collection of POOM items in a folder. For more information, see IPOutlookItemCollection. |
oidPIM |
[in] Reference to the PIM item's Object Identifier (OID). OIDs are DWORD values that uniquely identify POOM items within an Item Store. In POOM, an OID is also a Windows Embedded Compact Object Identifier (CEOID), which uniquely identify all Windows Embedded Compact objects (databases, database volumes, database records, files, registry keys, etc.). You can find the definition for this type in the Windbase.h header file. |
pdwIndex |
[out] Reference to the item's zero-based index position within the PIM Item collection. |
Property Value/Return Value
This method returns the standard values HRESULT_FROM_WIN32(GetLastError()), E_INVALIDARG, and ERROR_NOT_FOUND, as well as the following:
- S_OK
The method completed successfully.
Remarks
The item collection can be a collection created with IPOutlookItemCollection::Restrict.
GetItemIndexFromOid returns a zero-based index value. To avoid a "one-off" error when you retrieve the Item, add 1 to the value returned in the dwIndex parameter before passing it to the IPOutlookItemCollection::Item method, because its iItem argument takes a onebased index value.
Requirements
Header |
pimstore.h |
Library |
Pimstore.lib |
See Also
Reference
Pocket Outlook Object Model Functions
CHOOSECONTACT Structure
ChooseContact
FindMatchingContact