Hi,
Is there a standard function in wince to find out when an interrupt
occurred last time. Basically I want to find out when (time) the
keyboard interrupt occurred last and take some additional action.

Thanks,
Shiju

Re: How to find out last interrupt time by Elias

Elias
Sat Jun 09 09:22:24 CDT 2007

shiju,

Interesting question, I don't think there is a specific WCE API for
this, but you can easily add some kind of logger in the IST of the
keyboard driver, then call an IOCTL to that driver to get the logging
information (of the last interrupt) when needed.
You can also use the CeLog functionalities in WinCE, check the CE
documentation for CeLog.

Elias


On Jun 8, 6:30 pm, shiju <msh...@gmail.com> wrote:
> Hi,
> Is there a standard function in wince to find out when an interrupt
> occurred last time. Basically I want to find out when (time) the
> keyboard interrupt occurred last and take some additional action.
>
> Thanks,
> Shiju



RE: How to find out last interrupt time by JoshChang

JoshChang
Sun Jun 10 20:16:00 CDT 2007

Hi shiju,

You may call "GetTickCount" either in your Keyboard driver where the
interrupt invoked or simply in the system interrupt handler.

Best Regards,

"shiju" wrote:

> Hi,
> Is there a standard function in wince to find out when an interrupt
> occurred last time. Basically I want to find out when (time) the
> keyboard interrupt occurred last and take some additional action.
>
> Thanks,
> Shiju
>

Re: How to find out last interrupt time by shiju

shiju
Mon Jun 11 17:47:13 CDT 2007

Hi,
Thanks for your info. I have come across a better solution to suit my
need. But has problems. I wrote a small driver and call
MsgWaitForMultipleObjects() function to get the key press event. But
when this function is called in the driver, I get an NK.exe
exception(First-chance exception in NK.exe. 0xc000001c:Invalid System
Service). Below is the syntax I used for the function.

DWORD DwResult;
HANDLE h = CreateEvent(0, TRUE, FALSE, 0);
DwResult = MSgWaitForMultipleObjects(1, &h, FALSE,10000, QS_KEY);

Is the above syntax wrong to get the keypad events.

Thanks,
Shiju
Josh Chang wrote:
> Hi shiju,
>
> You may call "GetTickCount" either in your Keyboard driver where the
> interrupt invoked or simply in the system interrupt handler.
>
> Best Regards,
>
> "shiju" wrote:
>
>> Hi,
>> Is there a standard function in wince to find out when an interrupt
>> occurred last time. Basically I want to find out when (time) the
>> keyboard interrupt occurred last and take some additional action.
>>
>> Thanks,
>> Shiju
>>

Re: How to find out last interrupt time by Michel

Michel
Mon Jun 11 19:34:11 CDT 2007

Did you try this code *outside* of a driver, so in an application? Does
it work? Are you sure GWES is ready when your driver calls this function
(see IsAPIReady API)?

If you've checked the above:

Looking at MSDN it says for dwWakeMask:

"Specifies input types for which an input event object handle will be
*added to the array of object handles*. This parameter can be any
combination of the following values. "

So, I guess you don't need to create an event in HANDLE h. I've never
used this API before, and the docs are quite unclear about this, but you
may try the following:

HANDLE h;
DWORD dwResult = MsgWaitForMultipleObjects(0, &h, FALSE, 10000, QS_KEY);

And if that doesn't work, then maybe:

HANDLE h[2] = {NULL};
h[0] = CreateEvent(0, TRUE, FALSE, 0);
DWORD dwResult = MsgWaitForMultipleObjects(1, h, FALSE, 10000, QS_KEY);

Michel Verhagen, eMVP
EmbeddedFusion
www.EmbeddedFusion.com
mverhagen at embeddedfusion dot com

shiju wrote:
> Hi,
> Thanks for your info. I have come across a better solution to suit my
> need. But has problems. I wrote a small driver and call
> MsgWaitForMultipleObjects() function to get the key press event. But
> when this function is called in the driver, I get an NK.exe
> exception(First-chance exception in NK.exe. 0xc000001c:Invalid System
> Service). Below is the syntax I used for the function.
>
> DWORD DwResult;
> HANDLE h = CreateEvent(0, TRUE, FALSE, 0);
> DwResult = MSgWaitForMultipleObjects(1, &h, FALSE,10000, QS_KEY);
>
> Is the above syntax wrong to get the keypad events.
>
> Thanks,
> Shiju
> Josh Chang wrote:
>> Hi shiju,
>> You may call "GetTickCount" either in your Keyboard driver where
>> the interrupt invoked or simply in the syst