Q: POOM and named properties

A

Adam Bradley

After doing some research, I've managed to write some named properties
using the Redemption in C#
Now I'd like to read the on my Windows Mobile Device and I understand
the POOM library will allow me
to read them using .netcf in C#.

Does anyone have any hints/code that might make this task easier?

Thanks in advance!
Adam
 
P

Peter Foot [MVP]

The Contact class provides the "Properties" which returns a PimPropertySet
for the item type. You can then call Add on this to add a new property e.g.
c.Properties.Add("MyCustomProperty",typeof(string));

This is then accessible via

c.Properties["MyCustomProperty"]

Custom properties will not be synchronised via ActiveSync nor will they
appear on the standard Pocket Outlook screens.

Peter
 
A

Adam Bradley

Peter said:
The Contact class provides the "Properties" which returns a PimPropertySet
for the item type. You can then call Add on this to add a new property e.g.
c.Properties.Add("MyCustomProperty",typeof(string));

This is then accessible via

c.Properties["MyCustomProperty"]

Custom properties will not be synchronised via ActiveSync nor will they
appear on the standard Pocket Outlook screens.

Peter

Peter,

Thanks for the feedback. Just to clarify, I was under the (perhaps
misguided) impression "named properties" were different to custom
properties.

I found this reference to "named properties" in the MSDN library
http://msdn.microsoft.com/library/d.../html/mob5lrfipoutlookapp2getidsfromnames.asp

Happy to be wrong just would like to know.

I think my next question will revolve around how to write an ActiveSync
provider in C# !

PS: I promise this is the last time I will ask :)

Regards,
Adam
 
P

Peter Foot [MVP]

Under the hood the managed classes are using the same GetIDsFromNames /
SetProps method to create a new property id for your added property and then
store the value. Custom/named properties are the same thing. GetIDsFromNames
will also return the property ids of existing properties on the database
(even though these are already defined in pimstore.h)

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

Adam Bradley said:
Peter said:
The Contact class provides the "Properties" which returns a
PimPropertySet for the item type. You can then call Add on this to add a
new property e.g.
c.Properties.Add("MyCustomProperty",typeof(string));

This is then accessible via

c.Properties["MyCustomProperty"]

Custom properties will not be synchronised via ActiveSync nor will they
appear on the standard Pocket Outlook screens.

Peter

Peter,

Thanks for the feedback. Just to clarify, I was under the (perhaps
misguided) impression "named properties" were different to custom
properties.

I found this reference to "named properties" in the MSDN library
http://msdn.microsoft.com/library/d.../html/mob5lrfipoutlookapp2getidsfromnames.asp

Happy to be wrong just would like to know.

I think my next question will revolve around how to write an ActiveSync
provider in C# !

PS: I promise this is the last time I will ask :)

Regards,
Adam
 
A

Adam Bradley

Peter said:
The Contact class provides the "Properties" which returns a PimPropertySet
for the item type. You can then call Add on this to add a new property e.g.
c.Properties.Add("MyCustomProperty",typeof(string));

This is then accessible via

c.Properties["MyCustomProperty"]

Custom properties will not be synchronised via ActiveSync nor will they
appear on the standard Pocket Outlook screens.

Peter

Peter,

Thanks for the feedback. Just to clarify, I was under the (perhaps
misguided) impression "named properties" were different to custom
properties.

I found this reference to "named properties" in the MSDN library
http://msdn.microsoft.com/library/d.../html/mob5lrfipoutlookapp2getidsfromnames.asp

Happy to be wrong just would like to know.

I think my next question will revolve around how to write an ActiveSync
provider in C# !

PS: I promise this is the last time I will ask :)

Regards,
Adam
 
P

Peter Foot [MVP]

Writing true activesync providers is not possible solely with managed code.
However you can write a desktop/device pair which autostart when your device
is connected over activesync. You can use Sockets for example to talk
between both sides. Your device component will need to use POOM to modify
the pim data and your desktop component can send the data in any format that
you desire for you to process. You should be able to find some examples of
generic sockets client/listeners in the SDK documentation and via google.

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

Adam Bradley said:
Peter said:
The Contact class provides the "Properties" which returns a
PimPropertySet for the item type. You can then call Add on this to add a
new property e.g.
c.Properties.Add("MyCustomProperty",typeof(string));

This is then accessible via

c.Properties["MyCustomProperty"]

Custom properties will not be synchronised via ActiveSync nor will they
appear on the standard Pocket Outlook screens.

Peter

Peter,

Thanks for the feedback. Just to clarify, I was under the (perhaps
misguided) impression "named properties" were different to custom
properties.

I found this reference to "named properties" in the MSDN library
http://msdn.microsoft.com/library/d.../html/mob5lrfipoutlookapp2getidsfromnames.asp

Happy to be wrong just would like to know.

I think my next question will revolve around how to write an ActiveSync
provider in C# !

PS: I promise this is the last time I will ask :)

Regards,
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top