Hi,
I need to dial a number on the Treo 600, and it doesn't seem to be working. It
causes a crash, and according to the system log, the application causing the
crash was "Phone", and not my own application.
Anyway, here's the code I'm using to initiate the call:
Wait -- one more thing: everything works, if I set confirm to true, or copy the
values for name and number from string constants.
Here's the code:
static void LaunchPhone(char* number, char* name, bool confirm)
{
PhoneAppLaunchCmdDialType* dial;
UInt16 len;
dial = (PhoneAppLaunchCmdDialType *)
MemPtrNew(sizeof(PhoneAppLaunchCmdDialType));
dial->version = 1;
dial->confirm = confirm;
len = StrLen(name);
dial->name = (char*)MemPtrNew(len+1);
StrCopy(dial->name, name);
len = StrLen(number);
dial->number = (char*)MemPtrNew(len+1);
StrCopy(dial->number, number);
dial->failLaunchCreator = appFileCreator;
dial->failLaunchCode = sysAppLaunchCmdNormalLaunch;
dial->dialMethod = PhoneAppDialMethodNormal;
MemPtrSetOwner((MemPtr)dial, 0);
MemPtrSetOwner((MemPtr)dial->name, 0);
MemPtrSetOwner((MemPtr)dial->number, 0);
LaunchWithCommand(sysFileTApplication, hsFileCPhone,
phoneAppLaunchCmdDial, dial);
}
Thanks.
-Benjamin Bloomfield
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/