.NET Strange behavior...

B

Brian

Hi all,

I've tested this on a couple of Ipaqs (all that I have access to) so I'm not
sure if this is a bug in WM2003, the .NET framework, or Ipaq OEM code.

My app (as an alarm) must wake up the PPC using CeRunAppAtTime. Due to some
wake up issues on PPC2003 devices, I use code modified from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k/html/ppc_layoff.asp

...to make sure the screen is on when the app runs. This seems to solve the
PPC2003 wake up issues. But here's the problem:

1) If I compile this C++ as an EXE, and run it in parallel with my .NET app,
all works fine (PPC wakes up).
2) If I compile this C++ as a DLL, and P/Invoke it from my .NET app, it does
not work most of the time.
3) If I compile this code as part of my project in .NET (code was posted on
the OpenNetCF forums) it does not work most of the time.

So obviously running the EXE outside of the framework allows the PPC to
fully wake up, running it from within the framework is the problem. Ideas?
Is this a bug?

Thanks,
Brian
 
B

Brian

Thanks Alex!

Actually, the code I included in my app for testing was at (just to wake up
the screen):

http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=774

.... basically the easiest solution was to put the file in an EXE, then to a
DLL, then just port it to .NET native (as in the link above).

OK, I see what you're saying -- this is really interesting. So of course,
if the app was running when the device suspended, then it just receives
focus on power up and of course is not relaunched, so the code I have is not
even executed. Good theory, I'm going to test this... basically, instead of
calling the DLL on launch, I can just move the code to call the DLL when the
alarm sounds. So, when RunAppAtTime wakes up the PPC, my method to sound
the alarm is triggered, and screen should turn on. Does this sound like a
reasonable test?

I'll give it a try and post back how it works.

Thanks for your help!
Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top