hey guys, i'm quite new to programming (specially in palm os) and i'm having
problems in creating armlets.
i'm using palm os developer suite and i tried creating a standard make 68k pno
c/c++ project and used the simple application template (or should i say a
sample application). without editing the program yet, it crashed on my pda. i
noticed that it crashed inside the PceNativeResourceCall function because
DmGetResource doesn't return anything. i included the code of the
PceNativeResourceCall below for reference.
//PceNativeResourceCall()
static UInt32 PceNativeResourceCall(DmResType resType, DmResID resID, char*
DLLEntryPointP, void *userDataP)
{
UInt32 processorType;
MemHandle armH;
MemPtr armP;
UInt32 result;
// get the processor type
FtrGet(sysFileCSystem, sysFtrNumProcessorID, &processorType);
if (sysFtrNumProcessorIsARM(processorType))
{
// running on ARM; call the actual ARM resource
armH = DmGetResource(resType, resID);
armP = MemHandleLock(armH);
result = PceNativeCall(armP, userDataP);
FrmCustomAlert(1000, "PceNativeCall successful", 0, 0);
MemHandleUnlock(armH);
DmReleaseResource(armH);
}
else if (processorType == sysFtrNumProcessorx86)
{
// running on Simulator; call the DLL
result = PceNativeCall( (NativeFuncType*)DLLEntryPointP, userDataP);
FrmCustomAlert(1000, "PceNativeCall successful", 0, 0);
}
else
{
// some other processor; fail gracefully
ErrNonFatalDisplay("unsupported processor type");
result = -1;
}
return result;
}
//end of PceNativeResourceCall
this calls the PceNativeResourceCall function
result = PceNativeResourceCall('ARMC',0x1000, "test.dll\0PNOMain", inputData);
what seems to be the problem here and what should i do?
thanks in advance!!!
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/