IPOutlookApp::Logon
The Logon method logs on the user to a Pocket Outlook session. It must be the first method called for a Pocket Outlook object.
Syntax
HRESULT Logon(
long hWnd
);
Parameters
hWnd
[in] Handle to the parent window for the Pocket Outlook session. Pocket Outlook uses this handle for each PIM item's Display call, and for the infrared transfer dialog. This can be the PIM application window from CePimCommand.Note Using CePIMCommand to create Pocket Outlook menu add-ins has been deprecated. Use the IContextMenu interface instead.
For Visual Basic, this parameter is optional and has a Null default value.
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.
Example
The following code example shows how to log on the user to Pocket Outlook.
HRESULT hr;
IPOutlookApp * polApp;
// Initialize COM for Pocket Outlook.
if (FAILED(CoInitializeEx(NULL, 0))) return FALSE;
// Get the application object.
hr = CoCreateInstance(CLSID_Application,
NULL,
CLSCTX_INPROC_SERVER,
IID_IPOutlookApp,
(LPVOID*)&polApp);
if (FAILED(hr)) return FALSE;
// Log on to Pocket Outlook.
hr = polApp->Logon(NULL);
if (FAILED(hr))
return FALSE;
Requirements
Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: pimstore.h
Library: pimstore.lib
See Also
How to: Establish a POOM Session
Pocket Outlook Object Model API Interfaces
Pocket Outlook Object Model API Enumerations
Last updated on Friday, April 22, 2005
© 2005 Microsoft Corporation. All rights reserved.
Send feedback on this topic to the authors.