Share via


IFolder::AddItemToInfraredFolder

Send Feedback

The AddItemToInfraredFolder method adds an item to the list of items to be sent by infrared.

Syntax

HRESULT AddItemToInfraredFolder(
  int olItem,
  IDispatch * polItem
);

Parameters

  • olItem
    [in] PIM item type. One of the OlItemType enumeration values.
  • polItem
    [out] Reference to the item added to this folder.

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

You can add any number of items of any type or combination of types to the infrared folder. Call IFolder::SendToInfrared to transmit the items.

Code Example

The following code example shows how to add a Contact to the Infrared folder.

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.

void AddContactToIrFolder(IPOutlookApp polApp, IContact * pContact)
{
    IFolder * pFolderIR;
    polApp->GetDefaultFolder(olFolderInfrared, & pFolderIR);
    pFolderIR->AddItemToInfraredFolder(olFolderContacts, &pContact);

    // Release objects.
    pfolderIR->Release();
}

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: pimstore.h
Library: pimstore.lib

See Also

IFolder | 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.