ArianeSoft - Programming and development for Windows and Windows Mobile :: Forums :: PPL - Pocket Programming Language :: Code sharing |
|
<< Previous thread | Next thread >> |
Accessing POOM - Outlook Contacts, Tasks, etc. |
Moderators: kornalius, bmanske, PointOfLight
|
Author | Post | ||
DirectDance |
| ||
Registered Member #11 Joined: Mon Jul 03 2006, 06:15amPosts: 157 | Hi, this code sharing example should help to access the POOM library (Calendar, Contacts, etc.) wich is build in your PPC. First of all, thanks to Kornalius who changed the COM accessing in PPL, version 1.22. Please note, that you will need at least V1.22 of PPL to get access to the POOM functionality. I am using a PPC WM5.0 device. It seems, that the needed dll (pimstore) is installed and started on those devices on default. If you are running a version less than WM5.0, it could be, that you will need the eVB runtime to get access to the POOM functionality. To test, if your device is compatible on default, you could do this:
The result should include a line: PocketOutlook.Application,pimstore.dll or something sililar. If not, get the eVB runtime here: http://msdn.microsoft.com/mobility/windowsmobile/downloads/evb.aspx This is a .cab file wich can be copied to your device and starting it. It installs plenty of dll´s. I hope, after installing the cab file, you should have a entry "PocketOutlook.Application" because, this is the main handle of POOM. As told before, I could not test it, because the pimstore is installed by default on my device. It would be very nice, if somebody using an older device could respond to this thread and tell us if it is correct. Ok, now back to the POOM access. I will explain it mainly on using the Contacts folder. But it should work with Calendar, Tasks, etc., too. This is, because the POOM structure is equal in every folder structure. The folder structure is like this (simplified):
1. Initialize POOM
You will get a main handle to the POOM object. This has to be done only once, e.g. after your program was started. At this point, the variable poom$ is containing the handle but no operations on POOM could be done before log into the POOM object. 2. Logon to the POOM Object
Now you are connected to POOM. Please, before closing your application, do not forget to logoff from POOM. Ok, here are a few examples to play with POOM: 3. Create a new Contact
Of course, you can assign every datafield of POOM using the SetProperty method (LastName, FirstName, etc.. A complete list of the contact properties can be found on the microsoft websites. At this point I would like to do the same as in point -3-, but creating a new task 4. Create a new Task
Almost the same as in the contacts folder 5. Load / Search for a contact
The "Find" command is very flexible. For more infos about that command, please have a look into the MS Docs. Get the next data ("find" will only load the first data)
Puh ..., now my fingers are aching. I hope, the above listed examples will help you creating great apps using PPL. There are many other possibilities I have not described here. Of course, you can delete, modify, etc. those items. You will find tons of examples on the internet how to dodiffrent things using POOM. With the above listed examples it should be an easy one to rewrite any example wich was written for e.g. using eVB to PPL. A last important sentence: PPL is best! Cheers, DirectDance | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | Thx DD - these examples are great! There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
bmanske |
| ||
Registered Member #5 Joined: Mon May 15 2006, 10:04amPosts: 122 | Great examples! Thanks! | ||
Back to top | | ||
matteo.m |
| ||
Registered Member #8 Joined: Fri Jun 16 2006, 05:40amPosts: 367 | Thanks a lot !! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | Wow, thank you so much for this great tutorial. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Heinz |
| ||
Registered Member #114 Joined: Tue Oct 24 2006, 01:40pmPosts: 202 | Thanks a lot, Direct Dance!! That is VERY usefull! regards, Heinz | ||
Back to top | | ||
Slither |
| ||
Registered Member #458 Joined: Thu May 24 2007, 02:20amPosts: 22 | Will this work on WM6 please? | ||
Back to top | | ||
zehlein |
| ||
Registered Member #30 Joined: Tue Sep 12 2006, 03:00pmPosts: 449 | The easiest way would be to try and let us know, I think There is a crack, a crack in everything. That's how the light gets in. (L. Cohen) | ||
Back to top | | ||
DirectDance |
| ||
Registered Member #11 Joined: Mon Jul 03 2006, 06:15amPosts: 157 | No, it is not working on WM6 and some later versions of WM5. I can proceed the invokes of poom on those devices until the "item" collection but not further. MS has changed the access of POOM for their own language but not for others anymore | ||
Back to top | | ||
Slither |
| ||
Registered Member #458 Joined: Thu May 24 2007, 02:20amPosts: 22 | I tried it and copied the Initialise and Logon code followed by the Search/Load example then Logged off. This is what I got. APP: MYAPP_WM2003.EXE FILE: MYAPP_WM2003.EXE Proc:WINMAIN Opcode: INVOKE Char/Line/Offset: 0, 0, 0x00387e64 (WINMAIN) Access violation at 0x230a8 Is this a common error I made myself or does this mean that WM6 is changed as stated above. Cheers, Slither2006. (Using WM06) [EDIT] : I installed the eVB and found the above error message goes away. But I get the Address Alignment error message instead whenever I try to access the method to add an item. I showmsg'd the folder$ and items$ variables and are being assigned values. [ Edited Wed Oct 31 2007, 10:34pm ] | ||
Back to top | | ||
Smok Wawelski |
| ||
Registered Member #332 Joined: Thu Mar 22 2007, 01:32pmPosts: 4 | I found some more information about POOM: http://www.devbuzz.com/content/zinc_evb_and_poom_pg1.asp . You can find there explanation of those mysterious numbers (10 for contacts etc..). [ Edited Wed Nov 28 2007, 05:49am ] | ||
Back to top | | ||
Slither |
| ||
Registered Member #458 Joined: Thu May 24 2007, 02:20amPosts: 22 | Programmed the app in C# POOM without any issues and didn't run into any of the problems i did with PPL....I'm yet to see someone access POOM from WM06 in PPL...Good luck to those who try. | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Currently you can't access POOM in WM6 through PPL. Microsoft broke pimstore.dll access part way through the WM5 lifespan, and has apparently decided not to fix it in favor of forcing people to access POOM through .Net. Unfortunately, PPL does not take advantage of .Net right now. Does your C# implementation work on pre-WM5 devices? Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||