below is a past post i found. I gave it a try. But the &resault arg sent
to the address book always comes back as null, and i dont see where you can
add in the phone number to search for???
****************
Re: contact lookup not working on T650
palmDev
Thu, 25 Nov 2004 11:37:17 -0800
no. the way i did it uses the treo launch codes.
if i use the standard PhoneNumberLookupCustom() then it works fine but
then it only displays one define lookup field eg: Home where as the below
code lets you select from all the voice numbers.
here is the lookup function for the treo
DmSearchStateType searchState;
UInt16 cardNo;
LocalID dbID;
UInt32 result;
Char *textP = "Phone lookup",
*addP = "Add";
AddrLookupParamsType params;
SysNotifyParamType notify;
AddrHsLookupUserDataType data;
MemSet(¶ms, sizeof(params), 0);
params.pasteButtonText = addP;
params.title = textP;
params.field1 = addrLookupSortField;
params.field2 = addrLookupVoicePhones;
params.field2Optional = true;
params.userShouldInteract = true;
params.formatStringP = "^voicephone";
data.version = 0;
data.useMultiFilter = false;
notify.notifyType = addrAppNotificationHsLookup;
notify.notifyDetailsP = ¶ms;
notify.userDataP = &data;
// launch the contact app and pass the parameters
if (!DmGetNextDatabaseByTypeCreator(true, &searchState,
sysFileTApplication, sysFileCAddress, false, &cardNo, &dbID))
SysAppLaunch(cardNo, dbID, 0, sysAppLaunchCmdNotify, ¬ify,
&result);
--
Scott Erickson
Software Engineer, FB-4, Inc.
[EMAIL PROTECTED]
"Scott Erickson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ive been trying to figure this out for sometime now, there isnt anything i
> can find in the docs that has helped me. I need to take the phone number
> of a received SMS and find out if its in the phone book or not. If it is,
> the SMS will go thru, if not its going to be blocked. How can I access
> the phone book without simply taking the database the contacts are in and
> searching each record for a string matching the senders number? I dont
> what to do it that way b/c the info about the database the contacts are
> stored it may change or be different on some devices (creatorID, database
> name...).
>
> --
>
>
> Scott Erickson
> Software Engineer, FB-4, Inc.
> [EMAIL PROTECTED]
>
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/