次の方法で共有


IFolder::AddItemToInfraredFolder (Windows Embedded CE 6.0)

1/6/2010

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
    [in] Pointer to the PIM item you want to add to the list.

    Note

    You must cast the Item object to a pointer to an IDispatch interface.

Return Value

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, (IDispatch*)pContact);
}

Requirements

Header pimstore.h
Library Pimstore.lib
Windows Embedded CE Windows CE 2.0 and later

See Also

Reference

IFolder
Pocket Outlook Object Model Interfaces

Other Resources

Pocket Outlook Object Model Enumerations