CeRunAppAtEvent on TimeZone Change

  • Thread starter Thread starter Jared Miniman
  • Start date Start date
J

Jared Miniman

(I also posted this in the ppc.developer ng, but I figure it's perfectly
on-topic here)

Hi all,

Is there some kind of hidden secret to get this working? I'm using a Pocket
PC 2003 (where this notification type *should* be supported) and on a PPC
2003 emulator. I'm calling:

BOOL bRet = CeRunAppAtEvent(L\\Windows\\calc.exe,
NOTIFICATION_EVENT_TZ_CHANGE), and the call fails every time! Why is this?
All of the other eleven notifications work fine.

--jsm NG*
 
It's possible that the documentation is wrong and although it applies to CE
it's not implemented in Windows Mobile. One issue which springs to mind -
are you changing the local timezone of the device itself, or switching
between the home/away settings in the time settings applet. Not sure whether
that makes any difference to whether the event is raised...

Peter
 
I'm just trying to register my app with the event; I'm not even at the point
yet where I want to see what happens when any timezone event occurs . . .

I know the registration is failing.

--jsm NG*
 
I see, what error is returned by GetLastError() (C++) /
Marshal.GetLastWin32Error() (.NETCF) ?

Peter
 
I have had this working. Did it in VB, but set a const for the event:
Const NOTIFICATION_EVENT_TZ_CHANGE = 12 'PocketPC only

Then called the function CeRunAppAtEvent(fileToLoad, LoadType) where
fileToLoad is the file and path (\Windows\calc.exe) and LoadType is
NOTIFICATION_EVENT_TZ_CHANGE. It set without a problem in a PPC 2003
SE device. It triggers when you change the TZ of the local time.
 
I get Error 87 (Invalid Parameter). Jeez, that's useful. I'm running this
on a PPC 2003 SE emulator, btw.

Can you get this to work on your end, Peter? I've tried this also in eVC
4.0 against the PPC 2003 SE emulator, with the same result.

--jsm NG*
 
Just confirmed that this works fine under WM 5.0. Why is this particular
API parameter invalid under PPC 2003 SE?

--jsm NG*
 
Back
Top