Jump to content

Write a plugin for Contacts


Guest Sasa Popovic

Recommended Posts

Guest Sasa Popovic

Hi everyone,

What I'm interested about is if it is possible to write a plugin for "Contacts" module (Smartphone 2003)?

What I actually need is to add a new menu item in Contacts menu (beside "New contact", "New SIM contact", "Delete", "Beam Contact" and "Filter") and to be notified when user selects my menu item. I beleave the second thing (to be notified when user selects my menu item) can be achived through the IContact interface but I'm not sure if it is possible to add additional menu items in "Contacts" menu?

I read about "POOM API" but can't find the way of doing what I need using it.

What I found here and on other discussion sites is how to write plugins for home page.

If someone have some experience on this or knows where I can find something more, please post it here.

I would appriciate any kind of help.

Thanks in advance,

Sasa

Link to comment
Share on other sites

  • 2 weeks later...
Guest Sasa Popovic

I followed steps in "Extending Context Menus" (from Smartphone SDK) and here is what I did so far:

1. Created a context menu extension COM DLL (using ATL) that implements IContextMenu and IObjectWithSite.

2. I registered my component.

3. I added next values in registry: HKLM\SOFTWARE\Microsoft\Shell\Extensions\ContextMenus\AppView\MSContacts\{MyCLSID}

default="My menu item"

DelayLoad=1

4. Copied my dll to "windows" folder on device.

When I start "contacts" application and click on "Menu", DllGetClassObject() function is called. That function calls _Module.GetClassObject() and returns S_OK (where _Module is CComModule instance).

After that, no other calls are made. I have implemented a logger that writes to text file and I'm sure that none of my functions are called after that.

Here is the list of functions I implemented:

IContextMenu functions:

GetCommandString, InvokeCommand and QueryContextMenu

IObjectWithSite functions:

GetSite and SetSite

Is there anyone who worked with this or have any clue about what can be the problem here.

What I also noticed is:

When I sign dll with privileged certificate and build project, eVC4 gives me message: "Failed to register \Windows\BCSrv.dll to the device" but my dll gets loaded when I select contacts->menu on device.

When I sign dll with unprivileged certificate (default development), eVC4 gives me message: "Successfully registered \Windows\BCSrv.dll to the device" but my dll doesn't get loaded when I select contacts->menu on device.

Should I give you more details on this?

Thanks in advance,

Sasa

Link to comment
Share on other sites

  • 3 months later...

Sasa,

A couple of things...if you want to write a plug-in as opposed to an application there is pretty good documentation available on this. It sounds like what you want to do is pretty straightforward so I think the documentation is available. If you want to see how to interact with the POOM database (which you will need to do for accessing contacts) please see the response I posted to VanderHuge's message (entitled "Checking for changes in POOM records"). It has some details on interacting with POOM. It's not exactly what you are looking for but perhaps it will be helpful to get you started.

Ted

Link to comment
Share on other sites

  • 4 months later...
Guest hmoner

hi guys

What could I do for my probelm ?

I've my contacts stored in my SIM card.

When I receive a call, there's no problem, but when I receive a text message, I can see only a number, not the contact's name...

I've the contact in my db, but for example:

John is: 154031225

but when I receive the message i get 5492644031225 instead of John

What could I do ? any plugin for this ?

I use SMT5600 Audiovox with WM2003SE

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.