Implementation of POOM Using Embedded Visual C++ 3.0


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Environment: EVC++3.0, WinCE, PocketPC SH3 or so

The contactMgt is the application which implements POOM and it has been successfully tested on SH3 processor and hope it will work fine on the rest of too. but before try to build it you need to register the DLL's on your Pocket PC, I choose regsvrce.exe(find out in Windows CE Tools folder ) for that. And you know which DLL you have to register (I don't want to repeat things again and again )

Once register DLL now its very easy

The parameter that is passed is the identifier for the folder that is to be retrieved.

Folder TypeValue

If facing any problem in LINKING use Project->Settings->Link and add /force

// Include headers
// in stdafx.h
#include "initguid.h>"
#include "pimstore.h"
// Initialize 

CoInitializeEx(NULL, 0);

hr = CLSIDFromProgID(POA_OBJECT, &clsid);
if (FAILED(hr))
 AfxMessageBox(_T("Fail to load CLSID"));
 hr = CoCreateInstance(clsid, 
                       (LPVOID *) &(polApp));
 if (FAILED(hr))
  err = GetLastError();
  sprintf(str,"Fail to load CoCreateInstance %d",err);

// ///////////in header file
IPOutlookApp    *polApp; // outlook app
IFolder *pFolder;
IPOutlookItemCollection *pContacts;

IPOlItems *pItem;
IContact *pContact;

CLSID clsid;

///////////////And Implementation is here
BSTR pwszVersion = NULL;

CString firstname,lastname,fullname;
CListBox* List1=(CListBox *)GetDlgItem(IDC_LIST1);
int olFolderContacts = 10;

hr = polApp->Logon(NULL);
if (FAILED(hr))
 AfxMessageBox(_T("Fail to login"));
 polApp->GetDefaultFolder(olFolderContacts, &pFolder);
 pContacts->QueryInterface(IID_IPOlItems, (LPVOID *) &pItem);

 int numItems,i;

 for (i = 1; i <= numItems; i++)
  pItem->Item(i, (IDispatch **) &pContact);
  LPTSTR Fname,Lname;
  firstname =(CString)Fname;
  lastname = (CString)Lname;
  fullname = firstname + " " + lastname;


Download source - 285 Kb
Download demo application - 5 Kb


  • linker error on CoInitializeEx(...)

    Posted by astaples on 05/13/2005 07:48pm

    I am having linker errors with CoInitializeEx(...) and CoCreateInstance(...) despite adding the "/force" option to my linker. If anyone knows the fix, I'd be very appreciative! -Alan astaples@diyprojectorcompany.com

  • Which DLL

    Posted by WillSinger on 03/16/2005 09:00pm

    I realize I am late to the game here and maybe I missed a previous article, but what DLL is it that needs registered?

  • DLL problem....

    Posted by Legacy on 01/28/2004 08:00am

    Originally posted by: Nitin Gahlaut


    I have seen your artical on "Codeguru.com" which is realted to WIN CE. So I have a query for you. I know my query is not related with ur code, but please help me, i m in trouble... actaully i could not get any help regarding that problem...

    Actually Nitin i m new in Win CE. Thats the prob....

    The problem is: I m trying to load some thride party DLL's for finger print verfication. But I when i load that DLL's on emulator through LoadLibrary(), then i got the error, i mean i always get the NULL, and in response error code sometimes "2", somethimes "126".
    But when i load some other system DLL's like "Aygshell.DLL" or "richink.DLL" etc. then it will work properly....

    One more important thing is there: only one dll which is realted to smart card is working but it is not working on emulator, it works properly only on Pocket PC. so why it not wroking on emulaotor...?

    So please tell me why i m not able to get the Handle of that DLL's. And please tell me from where i have to start to find out the solution.

    One more thing please tell me that before using that DLL, i have to register that DLL's or not. and if yes then how? Actually i also try to register that DLL's but could not able to register.

    Please send the solution of my prob.... or please guid me.... please arreange few min. for writing the reply ..

    Waiting for ur resposne....

    Nitin Gahlaut

  • Add Menu Item to Outlook

    Posted by Legacy on 01/14/2004 08:00am

    Originally posted by: Jason

    Is there a sample around that I can put into one of the VCE++ 3.0 or 4.0 compilers to show me how to do all this.

    I am a Delphi programmer, and don't really know how to do this, I'm having enough of a time getting around the Visual C interface let alone getting anything working.

    Can someone please help me?!


  • How to get notification on change in contacts?

    Posted by Legacy on 05/22/2003 07:00am

    Originally posted by: Boris

    Is there a property or signature that can be used to check if contacts collection has been changed? Is it possible to sing on notification on change?

    Thanks, Boris.

  • I have a question,,,

    Posted by Legacy on 02/18/2003 08:00am

    Originally posted by: ilseop

    I wanna sort the items.
    but it does not working.

    // incorrect working code
    polApp->GetDefaultFolder(olFolderContacts, &pFolder);
    pContacts->pSort( (BSTR)TEXT("[CompanyName]"), FALSE );

    Please Help me!!


  • Modified Date/time of contact

    Posted by Legacy on 02/03/2003 08:00am

    Originally posted by: Rakesh

    I want to get Date/time when a contact is modified last time.

  • It working OK ! :)

    Posted by Legacy on 10/10/2002 07:00am

    Originally posted by: ApolloVN

    Remember :
    - LINKING use Project->Settings->Link and add /force
    OK for PocketPC n PocketPC2002

  • Problems with the code

    Posted by Legacy on 08/30/2002 07:00am

    Originally posted by: Brad Murdoch

    I downloaded the sources provided on the page and attempted to compile for my pocket pc. I get three errors

    --------------------Configuration: ContactMgt - Win32 (WCE ARM) Debug--------------------
    Generating Code...
    StdAfx.obj : error LNK2005: IID_IPOutlookApp already defined in ContactMgtDlg.obj
    StdAfx.obj : error LNK2005: IID_IPOlItems already defined in ContactMgtDlg.obj
    ARMDbg/ContactMgt.exe : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.

    ContactMgt.exe - 3 error(s), 0 warning(s)

    anyone know whats going on here????

  • How to ascertain the last modify time of contact?

    Posted by Legacy on 02/04/2002 08:00am

    Originally posted by: David Liu

    As we know, there is a lastmodifytime propertiy at outlook object model on pc. But I can find the propertiy on pocket pc outlook object model. Is there a simple method to ascertain the last modify time of contact? If you know, please send me an email. Tsingslin@163.com
    Thanks a lot!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date