The Cutting Room: Detecting POOM changes

As with most developers, I have a large pool of code snippets from work, tests and investigations I’ve done in the past.  Sometimes these grow into products, other times they just sit on a hard drive waiting for a time for me to actually use them.

Over the coming weeks I plan to blow the dust off of some of these and see what looks worthwhile.  Simple stuff might get rolled into the SDF (I rolled in a keyboard hook a couple weeks ago) and some stuff will get pushed out as open source libraries because we simply don’t need any more products generating any more support load on us at the moment.

Hopefully we’ll come up with a coherent place to put all of these in the near future, but for now I’ll just post them here on my blog.

The first is the series is called POOMHelper.  I put this together back when WinMo 5.0 first came out while doing work that required that I detect when a POOM item was modified or deleted.  It’s a fairly straightforward piece of code that hooks into the eventing mechanism of POOM, plus it also allows you to set some properties of POOM items (mostly Contacts IIRC) that didn’t exist in the POOM object model at the time (they may have since been added).

Here’s what the public object model looks like:

POOMHelper.PNG

The code is released under our MIT X11 license, so do with it what you wish.  If you need support or help, we offer consulting services.

Download the POOMHelper source here
Download the Interop.PocketOutlook.dll assemly(64 KB) here.

1 thought on “The Cutting Room: Detecting POOM changes”

  1. Above library is giving error in GetContactProperty method on below line:

    IItem item = (IItem)m_outlookAppClass.GetItemFromOid(itemOID);

    Error is:

    System.Runtime.InteropServices.COMException was unhandled
    Message="Unspecified error "
    ErrorCode=-2147467259
    StackTrace:
    at PocketOutlook.IPOutlookApp.GetItemFromOid()
    at OpenNETCF.WindowsCE.POOM.POOMHelper.GetContactProperty()
    at POOMSample.Form1.POOMHelper_OutlookItemChanged()
    at OpenNETCF.WindowsCE.POOM.POOMHelper.m_hook_Changed()
    at OpenNETCF.WindowsCE.POOM.POOMMessageHook.WndProc()
    at Microsoft.WindowsCE.Forms.MessageWindow._WndProc()
    at Microsoft.AGL.Forms.EVL.EnterMainLoop()
    at System.Windows.Forms.Application.Run()
    at POOMSample.Program.Main()
    InnerException:

    GetContactProperty is called from PocketOutlook dll, I guess.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s