IPOutlookApp::GetDefaultFolder

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The GetDefaultFolder method gets an IFolder object for one of the folders provided by Outlook Mobile.

Syntax

HRESULT GetDefaultFolder(
    int olFolder,
   IFolder** ppIFolder
);

Parameters

  • ppIFolder
    [out] Reference to a IFolder object.

Return Value

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

  • S_OK
    The method completed successfully.

Code Example

The following code example shows how to get the Outlook Mobile Contacts 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 GetContactsFolder(IPOutlookApp * polApp)
{
    IFolder * pFolder;

    polApp->GetDefaultFolder(olFolderContacts, &pFolder);
    …
}

Requirements

Header pimstore.h
Library Pimstore.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Tasks

Adding PIM Items to the Outlook Mobile Database

Reference

IPOutlookApp
Pocket Outlook Object Model Interfaces

Other Resources

Pocket Outlook Object Model Enumerations