Compartir a través de


Determining the Version (Windows CE 5.0)

Send Feedback

The following Visual C++ code example shows how to get the Application object, log on, and determine the version of POOM you are running.

HRESULT hr;
IPOutlookApp *polApp = NULL;
BSTR pwszVersion = NULL;
    
// Start by initializing COM
CoInitializeEx (NULL, 0);

// Get the main application.
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;
}

// Get the version and display it in a message box
polApp->get_Version (&pwszVersion);
MessageBox (NULL, pwszVersion, TEXT ("POOM Version"), MB_SETFOREGROUND | MB_OK);

// Note the use of the SysFreeString method in the Application 
// object. Because SysFreeString is not defined on Palm-size 
// PC version 1.0, this is necessary for the code to compile 
// for that OS. If you will not be compiling this code on 
// that OS, call SysFreeString directly.
polApp->SysFreeString (pwszVersion);

// Log off and release the Application object.
polApp->Logoff ();
polApp->Release ();
return TRUE;

The following Visual Basic code example shows you how to determine the version of POOM.

Dim polApp as PocketOutlook.Application
Set polApp = CreateObject("PocketOutlook.Application")
polApp.Logon()
MsgBox polApp.Version()

See Also

Pocket Outlook Object Model Code Examples | Pocket Outlook Object Model Application Development

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.