nikhilkerala
Sat Mar 03 00:50:08 CST 2007
Thanks Mr. Johnson,
I know the SIM OIDs change in any order and that can cause problems.
But I am basically not storing these OIDs for future use, I just use it to
find the sim contact on which the user selected my context menu extension.
From the OID, I calculate the Index and pick the Sim Contact with that
particular index. I am doing this because I have no other way to.
Regards,
Nikhil Mathew
"Chani Johnson [MSFT]" wrote:
> Please beware. Math on oids is entirely not recommended because something as
> simple as deleting a SIM contact, or creating a new one and rebooting could
> change the order of the oids. This is a very fragile temporary solution...
>
> --
> Chani Johnson
> Software Development Engineer
> Microsoft Corp.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Nikhil Mathew" <nikhilkerala@rediffmail.com> wrote in message
> news:DB88D717-7649-43DF-8650-C1457EFBA33A@microsoft.com...
> > Thanks for the info Mr. Johnson.
> > Currently I have managed to convert Sim Contacts OID to Sim Contact Index
> > by
> > substracting the OID of the first Sim contact from all the OIDs received.
> > Though
> > temporary, it works forme fine.
> >
> > Thanks to Mr. Peter & Mr. Johnson for helping to solve this out.
> >
> > Regards,
> > Nikhil Mathew
> >
> >
> > "Chani Johnson [MSFT]" wrote:
> >
> >> Unfortunately I'm not sure how much that is going to help in the context
> >> of
> >> menu extensions. Essentially you are getting back an oid for the sim
> >> contacts, but it is not a PIM oid. This is because, as mentioned in the
> >> original post, POOM does not support SIM contacts. You would need to
> >> convert the oid to a SIM index in order to use the SIM management APIs,
> >> and
> >> although possible, it is not a supported conversion. Being unsupported,
> >> what you managed to do with it now might not work in future versions of
> >> Windows Mobile. I wish I had better news for you....
> >>
> >> --
> >> Chani Johnson
> >> Software Development Engineer
> >> Microsoft Corp.
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >> "Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in message
> >> news:1EC0E22C-8FA0-4FED-8CDD-A3BABE596788@microsoft.com...
> >> > There is an MSDN article which should help:-
> >> >
http://msdn2.microsoft.com/en-us/library/ms839358.aspx
> >> >
> >> > Peter
> >> >
> >> > --
> >> > Peter Foot
> >> > Device Application Development MVP
> >> > www.peterfoot.net | www.inthehand.com
> >> >
> >> > "Nikhil Mathew" <nikhilkerala@rediffmail.com> wrote in message
> >> > news:B8AC85BA-DCA3-426E-8826-1D95AC9B3C2B@microsoft.com...
> >> >> Thankyou....
> >> >>
> >> >> I get a large negative number as OID for contacts on PPC,
> >> >> for Sim Contacts, I get a positive large integer....
> >> >> (I mean when Dword is converted to string, it appears as large
> >> >> integer)
> >> >>
> >> >> for sim contacts in sequence, the returned value is seqntial by
> >> >> increment
> >> >> of 1
> >> >> and that almost proves that returned value is not garbage...
> >> >>
> >> >> By the way where can I see a SimReadPhonebookEntry() sample...
> >> >>
> >> >>
> >> >> Thanks Again...
> >> >>
> >> >>
> >> >> "Peter Foot [MVP]" wrote:
> >> >>
> >> >>> What format is the value returned? Since Oids are database record
> >> >>> IDs, I
> >> >>> wouldn't expect a sim contact to return an Oid. Perhaps its an index
> >> >>> you
> >> >>> can
> >> >>> use with SimReadPhonebookEntry? Unfortunately this scenario is not
> >> >>> documented.
> >> >>>
> >> >>> Peter
> >> >>>
> >> >>> --
> >> >>> Peter Foot
> >> >>> Device Application Development MVP
> >> >>> www.peterfoot.net | www.inthehand.com
> >> >>>
> >> >>> "Nikhil Mathew" <nikhilkerala@rediffmail.com> wrote in message
> >> >>> news:B3D47EF9-F7A1-4AB0-8824-35225124AEEB@microsoft.com...
> >> >>> >I created a native DLL that adds a context menu to contacts app of
> >> >>> >WM5
> >> >>> >by
> >> >>> > implementing IContextMenu (Credit goes to kind hearted people in
> >> >>> > this
> >> >>> > group).
> >> >>> > The OID of the contact that user selected is retrieved using
> >> >>> > ItemRefArray.
> >> >>> > I
> >> >>> > pass this OID to a c# application to display the contact details
> >> >>> > using
> >> >>> > POOM.
> >> >>> > But as POOM does not support Sim Contacts, I am not able to
> >> >>> > determine
> >> >>> > which
> >> >>> > contact the user selected. OpenNETCF supports retrieving
> >> >>> > SimContacts,
> >> >>> > but
> >> >>> > not
> >> >>> > with OID.
> >> >>> >
> >> >>> > So my problem is how to retrieve the Sim Contact details from it's
> >> >>> > OID
> >> >>> > ?
> >> >>> > Even if not available in C#, a native method will do...
> >> >>> >
> >> >>> > Pls Help...
> >> >>>
> >> >
> >>
> >>
> >>
>
>
>