Re: Global variable in kbfilter_serviceCallback is not getting updated

I’m staring at your code trying to find the bug, but I don’t see anything.

Mark Roddy

On Fri, Jul 1, 2011 at 10:19 AM, wrote:
> Hi All,
> I want to update global variable in kbfilter_servicecallback method of kbfilter.c in the DDK examples, this variable is to be set on push of particular key, global variable(a boolean) will be used by all instances of the driver. The issue is the global variable remains unchanged on assignment, it remains true(intial assignment).
>
> Thanks,
> Brijesh
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Did you declare a local var with the same name as the global?

d

debt from my phone

-----Original Message-----
From: Mark Roddy
Sent: Friday, July 01, 2011 7:50 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Global variable in kbfilter_serviceCallback is not getting updated

I’m staring at your code trying to find the bug, but I don’t see anything.

Mark Roddy

On Fri, Jul 1, 2011 at 10:19 AM, wrote:
> Hi All,
> I want to update global variable in kbfilter_servicecallback method of kbfilter.c in the DDK examples, this variable is to be set on push of particular key, global variable(a boolean) will be used by all instances of the driver. The issue is the global variable remains unchanged on assignment, it remains true(intial assignment).
>
> Thanks,
> Brijesh
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

There is no other variable with same name…there is no access related issue here right?

Thanks,
Brijesh

Did you declare and use the global in the same compilation unit?

d

debt from my phone

-----Original Message-----
From: xxxxx@gmail.com
Sent: Saturday, July 02, 2011 5:21 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Re: Global variable in kbfilter_serviceCallback is not getting updated

There is no other variable with same name…there is no access related issue here right?

Thanks,
Brijesh


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

hey got the issue…kbfilter_serviceCallback is getting called twice and boolean variable is getting set to the original value.
thanks for your time

I have a new question :slight_smile:

can i pass the unicode values to applications from kbfilter_serviceCallback function

Thanks,
Brijesh

Since the callback runs at dispatch you can complete io requests in it. The data is not Unicode though, just scan codes

d

debt from my phone

-----Original Message-----
From: xxxxx@gmail.com
Sent: Sunday, July 03, 2011 8:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Re: Global variable in kbfilter_serviceCallback is not getting updated

hey got the issue…kbfilter_serviceCallback is getting called twice and boolean variable is getting set to the original value.
thanks for your time

I have a new question :slight_smile:

can i pass the unicode values to applications from kbfilter_serviceCallback function

Thanks,
Brijesh


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer