IPOutlookApp2::GetItemFromOidEx

Send Feedback

The GetItemFromOidEx method gets a PIM item (either an Appointment, Contact, or Task), given it's unique Object Identifier (OID).

Syntax

HRESULT GetItemFromOidEx(
  ULONG oidPIM,
  ULONG ulFlags,
  IItem ** ppItem
)

Parameters

  • oidPIM
    [in] The object's unique identifier.
  • ulFlags
    [in] Not used. Must be 0.
  • ppItem
    [out] A reference to the PIM item.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Remarks

The GetItemFromOidEx method can also be is used to get folders.

Code Example

The following code example demonstrates how to use GetItemFromOidEx.

Note   To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

HRESULT GetItemFromOidExExample(IPOutlookApp2 *pPoom, long lOid, IItem **ppItem)
{

    HRESULT hr = E_FAIL;
    hr = pPoom->GetItemFromOidEx(lOid, 0, ppItem);

    return hr;

}

Requirements

Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: pimstore.h
Library: pimstore.lib

See Also

IPOutlookApp2 | IPOutlookApp | Pocket Outlook Object Model API Interfaces | Pocket Outlook Object Model API Enumerations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.