Hi,
I am using function SysUIAppSwitch in order to call another application
from current application which
both of them are on the same expansion card.
As second parameter the function SysUIAppSwitch is receiving dbID. If the
second application (which we are trying to switch on) is on the palm (not on
the card) we can use the function
DmGetNextDatabaseByTypeCreator (true, &PrvAppSearchState, 0,
ApplDBName, true, &cardNo, &dbID);
but when the application is on the card, this function can't find "dbId" and
return "0"
This is my code - if second application is on the Palm
this code is working.
What is it problem ?
DmSearchStateType PrvAppSearchState;
LocalID dbID;
UInt16 cardNo;
SysAppLaunchCmdCardType* cmdPBP = 0;
UInt16 volRefNum;
UInt32 volIterator=vfsIteratorStart;
DmGetNextDatabaseByTypeCreator (true, &PrvAppSearchState, 0,
ApplDBName, true, &cardNo, &dbID);
cmdPBP = MemPtrNew (sizeof (SysAppLaunchCmdCardType));
while (volIterator!=vfsIteratorStop)
{
error = VFSVolumeEnumerate(&volRefNum,&volIterator);
if(error==errNone)
{
volIterator=vfsIteratorStop;
break;
}
}
// Fill it in
MemPtrSetOwner (cmdPBP, 0);
// cmdPBP->err = expErrUnsupportedOperation;
cmdPBP->volRefNum = volRefNum;
cmdPBP->path ="/Palm/Launcher/AppName.prc";
cmdPBP->startFlags
=sysAppLaunchStartFlagAutoStart|sysAppLaunchStartFlagNoUISwitch;
SysUIAppSwitch(0,dbID,sysAppLaunchCmdCardLaunch,cmdPBP);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/