Keyboard driver problem

I hav written a keyboard filter driver, dat will dissable function keys, but after installation of my driver non of my key is working, why so…
Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN PKEYBOARD_INPUT_DATA InputDataStart,
IN PKEYBOARD_INPUT_DATA InputDataEnd,
IN OUT PULONG InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) && (InputDataStart->MakeCode <=0x44))
||(InputDataStart->MakeCode = 0x133) || (InputDataStart->MakeCode = 0x134))
{
bInsert = TRUE;
Key[0].MakeCode = 0xFE;
Key[0].Flags = 0x00;
Key[1].MakeCode = 0xFE;
Key[1].Flags = 0x01;

*InputDataConsumed = 1;
}
(*(PSERVICE_CALLBACK_ROUTINE) devExt->UpperConnectData.ClassService)(
devExt->UpperConnectData.ClassDeviceObject,
bInsert ? &Key[0] : InputDataStart,
bInsert ? &Key[2] : InputDataEnd,
InputDataConsumed);


IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

InputDataStart is an array, not just one packet. InputDataEnd is one
past the end of the array, so you must iterate like I showed you in my
first response over all the packets.

  1. bInsert is not initialized, so I would guess it is garbage that is
    != FALSE, so you are always reporting 0xFE.

  2. You are setting InputDataConsumed to 1, but the upper service
    callback will override the value you set in this pointer with the number
    of packets
    it received.

  3. instead of using 0x01 for the Flags, use KEY_BREAK which is much more
    clear

  4. if you are not allowing the function keys, do NOT call the upper
    service callback at all. Just skip over that particular packet and you
    are done. The code I gave you the first time will do this properly.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Wednesday, January 04, 2006 11:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard driver problem

I hav written a keyboard filter driver, dat will dissable function keys,
but after installation of my driver non of my key is working, why so…
Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN
PKEYBOARD_INPUT_DATA InputDataStart,
IN
PKEYBOARD_INPUT_DATA InputDataEnd,
IN OUT PULONG
InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) &&
(InputDataStart->MakeCode <=0x44))
||(InputDataStart->MakeCode = 0x133) ||
(InputDataStart->MakeCode = 0x134))
{
bInsert = TRUE;
Key[0].MakeCode = 0xFE;
Key[0].Flags = 0x00;
Key[1].MakeCode = 0xFE;
Key[1].Flags = 0x01;

*InputDataConsumed = 1;
}
(*(PSERVICE_CALLBACK_ROUTINE)
devExt->UpperConnectData.ClassService)(
devExt->UpperConnectData.ClassDeviceObject,
bInsert ? &Key[0] : InputDataStart,
bInsert ? &Key[2] : InputDataEnd,
InputDataConsumed);


IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

thanx Doron,
Ok tel me what
UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);

function will do and where will i get UpperServiceCallback function.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Thu, 5 Jan 2006 00:39:58 -0800

>
> InputDataStart is an array, not just one packet. InputDataEnd is one
> past the end of the array, so you must iterate like I showed you in my
> first response over all the packets.
>
> 1) bInsert is not initialized, so I would guess it is garbage that is
> != FALSE, so you are always reporting 0xFE.
>
> 2) You are setting InputDataConsumed to 1, but the upper service
> callback will override the value you set in this pointer with the number
> of packets
> it received.
>
> 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much more
> clear
>
> 4) if you are not allowing the function keys, do NOT call the upper
> service callback at all. Just skip over that particular packet and you
> are done. The code I gave you the first time will do this properly.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 04, 2006 11:45 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Keyboard driver problem
>
> I hav written a keyboard filter driver, dat will dissable function keys,
> but after installation of my driver non of my key is working, why so…
> Here is code:
>
> VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> IN
> PKEYBOARD_INPUT_DATA InputDataStart,
> IN
> PKEYBOARD_INPUT_DATA InputDataEnd,
> IN OUT PULONG
> InputDataConsumed
> )
> {
> // DbgPrint(“KbFilter_ServiceCallback Called”);
> PDEVICE_EXTENSION devExt;
> KEYBOARD_INPUT_DATA Key[5];
> BOOLEAN bInsert;
>
> devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
>
> if(((InputDataStart->MakeCode >= 0x3b) &&
> (InputDataStart->MakeCode <=0x44))
> ||(InputDataStart->MakeCode = 0x133) ||
> (InputDataStart->MakeCode = 0x134))
> {
> bInsert = TRUE;
> Key[0].MakeCode = 0xFE;
> Key[0].Flags = 0x00;
> Key[1].MakeCode = 0xFE;
> Key[1].Flags = 0x01;
>
> InputDataConsumed = 1;
> }
> (
(PSERVICE_CALLBACK_ROUTINE)
> devExt->UpperConnectData.ClassService)(
> devExt->UpperConnectData.ClassDeviceObject,
> bInsert ? &Key[0] : InputDataStart,
> bInsert ? &Key[2] : InputDataEnd,
> InputDataConsumed);
>
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

I don’t know - a debugger might help you, but for starters bInsert is
uninitialized and consequently its value is garbage in the case where your
if statement’s conditional expression is FALSE.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Thursday, January 05, 2006 2:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard driver problem

I hav written a keyboard filter driver, dat will dissable
function keys, but after installation of my driver non of my
key is working, why so…
Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN
PKEYBOARD_INPUT_DATA InputDataStart,
IN
PKEYBOARD_INPUT_DATA InputDataEnd,
IN
OUT PULONG InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) &&
(InputDataStart->MakeCode <=0x44))
||(InputDataStart->MakeCode = 0x133) ||
(InputDataStart->MakeCode = 0x134))
{
bInsert = TRUE;
Key[0].MakeCode = 0xFE;
Key[0].Flags = 0x00;
Key[1].MakeCode = 0xFE;
Key[1].Flags = 0x01;

*InputDataConsumed = 1;
}
(*(PSERVICE_CALLBACK_ROUTINE)
devExt->UpperConnectData.ClassService)(
devExt->UpperConnectData.ClassDeviceObject,
bInsert ? &Key[0] : InputDataStart,
bInsert ? &Key[2] : InputDataEnd,
InputDataConsumed);


IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com Check out our value-added Premium features,
such as an extra 20MB for mail storage, POP3, e-mail
forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

UpperServiceCallback will consume the current packet (pCur) and tell you
if it consumed the packet if tmpConsumed == 1 after it returned.

UpperServiceCallback is the same as
devExt->UpperConnectData.ClassService

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Thursday, January 05, 2006 1:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard driver problem

thanx Doron,
Ok tel me what
UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);

function will do and where will i get UpperServiceCallback function.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Thu, 5 Jan 2006 00:39:58 -0800

>
> InputDataStart is an array, not just one packet. InputDataEnd is one
> past the end of the array, so you must iterate like I showed you in my
> first response over all the packets.
>
> 1) bInsert is not initialized, so I would guess it is garbage that is
> != FALSE, so you are always reporting 0xFE.
>
> 2) You are setting InputDataConsumed to 1, but the upper service
> callback will override the value you set in this pointer with the
number
> of packets
> it received.
>
> 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much
more
> clear
>
> 4) if you are not allowing the function keys, do NOT call the upper
> service callback at all. Just skip over that particular packet and
you
> are done. The code I gave you the first time will do this properly.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 04, 2006 11:45 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Keyboard driver problem
>
> I hav written a keyboard filter driver, dat will dissable function
keys,
> but after installation of my driver non of my key is working, why
so…
> Here is code:
>
> VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> IN
> PKEYBOARD_INPUT_DATA InputDataStart,
> IN
> PKEYBOARD_INPUT_DATA InputDataEnd,
> IN OUT PULONG
> InputDataConsumed
> )
> {
> // DbgPrint(“KbFilter_ServiceCallback Called”);
> PDEVICE_EXTENSION devExt;
> KEYBOARD_INPUT_DATA Key[5];
> BOOLEAN bInsert;
>
> devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
>
> if(((InputDataStart->MakeCode >= 0x3b) &&
> (InputDataStart->MakeCode <=0x44))
> ||(InputDataStart->MakeCode = 0x133) ||
> (InputDataStart->MakeCode = 0x134))
> {
> bInsert = TRUE;
> Key[0].MakeCode = 0xFE;
> Key[0].Flags = 0x00;
> Key[1].MakeCode = 0xFE;
> Key[1].Flags = 0x01;
>
> InputDataConsumed = 1;
> }
> (
(PSERVICE_CALLBACK_ROUTINE)
> devExt->UpperConnectData.ClassService)(
> devExt->UpperConnectData.ClassDeviceObject,
> bInsert ? &Key[0] : InputDataStart,
> bInsert ? &Key[2] : InputDataEnd,
> InputDataConsumed);
>
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

> ||(InputDataStart->MakeCode = 0x133) || (InputDataStart-

I don’t know if anyone else noticed or not but this could be the reason.
Try using == instead of =. I prefer to do the comparisons by putting
magic #s on the left. That way these typo errors are easily caught.

:slight_smile:
Harish

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-232827-
xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Wednesday, January 04, 2006 11:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard driver problem

I hav written a keyboard filter driver, dat will dissable function
keys,
but after installation of my driver non of my key is working, why
so…
Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN
PKEYBOARD_INPUT_DATA
InputDataStart,
IN
PKEYBOARD_INPUT_DATA
InputDataEnd,
IN OUT PULONG
InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) &&
(InputDataStart->MakeCode
<=0x44))
||(InputDataStart->MakeCode = 0x133) || (InputDataStart-
>MakeCode = 0x134))
{
bInsert = TRUE;
Key[0].MakeCode = 0xFE;
Key[0].Flags = 0x00;
Key[1].MakeCode = 0xFE;
Key[1].Flags = 0x01;

*InputDataConsumed = 1;
}
(*(PSERVICE_CALLBACK_ROUTINE) devExt-
>UpperConnectData.ClassService)(
devExt->UpperConnectData.ClassDeviceObject,
bInsert ? &Key[0] : InputDataStart,
bInsert ? &Key[2] : InputDataEnd,
InputDataConsumed);


IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail
storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Vikky Kishra wrote:

I hav written a keyboard filter driver, dat will dissable function keys, but after installation of my driver non of my key is working, why so…

I know! I know! Is there a prize?

Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN PKEYBOARD_INPUT_DATA InputDataStart,
IN PKEYBOARD_INPUT_DATA InputDataEnd,
IN OUT PULONG InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) && (InputDataStart->MakeCode <=0x44))
||(InputDataStart->MakeCode = 0x133) || (InputDataStart->MakeCode = 0x134))
{

You have an insufficient number of equal signs in two of those
comparisons. This statement will ALWAYS return true, and will always
result in InputDataStart->MakeCode being set to 0x133.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I would prefer it if people set their warning level up to 4, ran prefast
on their code, and used a debugger to analyze their problems first, and
then when they really got stuck, went to the boards to get help.
However, it seems that instead it is ‘my code doesn’t work what could be
wrong’ is the first option.

Good catch on the assign instead of compare bug, and I also prefer the
awkward ‘constant == variable’ pattern as well for exactly the same
reason.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harish Arora
Sent: Thursday, January 05, 2006 1:06 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard driver problem

||(InputDataStart->MakeCode = 0x133) || (InputDataStart-

I don’t know if anyone else noticed or not but this could be the reason.
Try using == instead of =. I prefer to do the comparisons by putting
magic #s on the left. That way these typo errors are easily caught.

:slight_smile:
Harish

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-232827-
xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Wednesday, January 04, 2006 11:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard driver problem

I hav written a keyboard filter driver, dat will dissable function
keys,
but after installation of my driver non of my key is working, why
so…
Here is code:

VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
IN
PKEYBOARD_INPUT_DATA
InputDataStart,
IN
PKEYBOARD_INPUT_DATA
InputDataEnd,
IN OUT PULONG
InputDataConsumed
)
{
// DbgPrint(“KbFilter_ServiceCallback Called”);
PDEVICE_EXTENSION devExt;
KEYBOARD_INPUT_DATA Key[5];
BOOLEAN bInsert;

devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;

if(((InputDataStart->MakeCode >= 0x3b) &&
(InputDataStart->MakeCode
<=0x44))
||(InputDataStart->MakeCode = 0x133) || (InputDataStart-
>MakeCode = 0x134))
{
bInsert = TRUE;
Key[0].MakeCode = 0xFE;
Key[0].Flags = 0x00;
Key[1].MakeCode = 0xFE;
Key[1].Flags = 0x01;

*InputDataConsumed = 1;
}
(*(PSERVICE_CALLBACK_ROUTINE) devExt-
>UpperConnectData.ClassService)(
devExt->UpperConnectData.ClassDeviceObject,
bInsert ? &Key[0] : InputDataStart,
bInsert ? &Key[2] : InputDataEnd,
InputDataConsumed);


IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail
storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

When i m debugging my code and checking for the key pressed,after one time execution of for (pCur = InputDataStart; pCur < InputDataEnd; pCur++)

other time it is not going in loop.
When I m Printing the Value at *InputDataStart and *InputDataEnd,i m getting same value irrespective of how many keys i pressed,queue is storing only one data.

Thanx in advance


IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

*InputDataStart and *InputDataEnd is dereferencing the pointer. You need
to sit back and look at the C code and understand how C works here. You
need to compare InputDataStart against InputDataEnd, the actual pointer
values themselves like I had in the loop. *InputDataEnd is meaningless,
it contains no real data, it serves as a marker as the end of the array
of packets.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Friday, January 06, 2006 10:44 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] KeyBoard Driver Problem

When i m debugging my code and checking for the key pressed,after one
time execution of for (pCur = InputDataStart; pCur < InputDataEnd;
pCur++)

other time it is not going in loop.
When I m Printing the Value at *InputDataStart and *InputDataEnd,i m
getting same value irrespective of how many keys i pressed,queue is
storing only one data.

Thanx in advance


IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

If i m setting values of keys which i want to make inactive to 0xFE, will it make it inactive.

Thanx in advance.
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] KeyBoard Driver Problem
Date: Fri, 6 Jan 2006 23:27:21 -0800

>
> *InputDataStart and *InputDataEnd is dereferencing the pointer. You need
> to sit back and look at the C code and understand how C works here. You
> need to compare InputDataStart against InputDataEnd, the actual pointer
> values themselves like I had in the loop. *InputDataEnd is meaningless,
> it contains no real data, it serves as a marker as the end of the array
> of packets.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Friday, January 06, 2006 10:44 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] KeyBoard Driver Problem
>
> When i m debugging my code and checking for the key pressed,after one
> time execution of for (pCur = InputDataStart; pCur < InputDataEnd;
> pCur++)
>
> other time it is not going in loop.
> When I m Printing the Value at *InputDataStart and *InputDataEnd,i m
> getting same value irrespective of how many keys i pressed,queue is
> storing only one data.
>
> Thanx in advance
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

Thanx Doron,
Now my Keyboard driver is working properly, but i want to use it for USB keyboard. So kindly suggest me that what changes should i do in my current driver
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Thu, 5 Jan 2006 08:43:23 -0800

>
> UpperServiceCallback will consume the current packet (pCur) and tell you
> if it consumed the packet if tmpConsumed == 1 after it returned.
>
> UpperServiceCallback is the same as
> devExt->UpperConnectData.ClassService
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Thursday, January 05, 2006 1:26 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> thanx Doron,
> Ok tel me what
> UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
>
> function will do and where will i get UpperServiceCallback function.
>
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Thu, 5 Jan 2006 00:39:58 -0800
>
> >
> > InputDataStart is an array, not just one packet. InputDataEnd is one
> > past the end of the array, so you must iterate like I showed you in my
> > first response over all the packets.
> >
> > 1) bInsert is not initialized, so I would guess it is garbage that is
> > != FALSE, so you are always reporting 0xFE.
> >
> > 2) You are setting InputDataConsumed to 1, but the upper service
> > callback will override the value you set in this pointer with the
> number
> > of packets
> > it received.
> >
> > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much
> more
> > clear
> >
> > 4) if you are not allowing the function keys, do NOT call the upper
> > service callback at all. Just skip over that particular packet and
> you
> > are done. The code I gave you the first time will do this properly.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 04, 2006 11:45 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Keyboard driver problem
> >
> > I hav written a keyboard filter driver, dat will dissable function
> keys,
> > but after installation of my driver non of my key is working, why
> so…
> > Here is code:
> >
> > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataStart,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataEnd,
> > IN OUT PULONG
> > InputDataConsumed
> > )
> > {
> > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > PDEVICE_EXTENSION devExt;
> > KEYBOARD_INPUT_DATA Key[5];
> > BOOLEAN bInsert;
> >
> > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> >
> > if(((InputDataStart->MakeCode >= 0x3b) &&
> > (InputDataStart->MakeCode <=0x44))
> > ||(InputDataStart->MakeCode = 0x133) ||
> > (InputDataStart->MakeCode = 0x134))
> > {
> > bInsert = TRUE;
> > Key[0].MakeCode = 0xFE;
> > Key[0].Flags = 0x00;
> > Key[1].MakeCode = 0xFE;
> > Key[1].Flags = 0x01;
> >
> > InputDataConsumed = 1;
> > }
> > (
(PSERVICE_CALLBACK_ROUTINE)
> > devExt->UpperConnectData.ClassService)(
> > devExt->UpperConnectData.ClassDeviceObject,
> > bInsert ? &Key[0] : InputDataStart,
> > bInsert ? &Key[2] : InputDataEnd,
> > InputDataConsumed);
> >
> >
> > –
> >
> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> –
>

> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com


______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

KBDFILTR-based filters will work for all keyboards, both PS/2 and USB.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Vikky Kishra”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, January 11, 2006 1:54 PM
Subject: RE: [ntdev] Keyboard driver problem

Thanx Doron,
Now my Keyboard driver is working properly, but i want to use it for USB
keyboard. So kindly suggest me that what changes should i do in my current
driver
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Thu, 5 Jan 2006 08:43:23 -0800

>
> UpperServiceCallback will consume the current packet (pCur) and tell you
> if it consumed the packet if tmpConsumed == 1 after it returned.
>
> UpperServiceCallback is the same as
> devExt->UpperConnectData.ClassService
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Thursday, January 05, 2006 1:26 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> thanx Doron,
> Ok tel me what
> UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
>
> function will do and where will i get UpperServiceCallback function.
>
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Thu, 5 Jan 2006 00:39:58 -0800
>
> >
> > InputDataStart is an array, not just one packet. InputDataEnd is one
> > past the end of the array, so you must iterate like I showed you in my
> > first response over all the packets.
> >
> > 1) bInsert is not initialized, so I would guess it is garbage that is
> > != FALSE, so you are always reporting 0xFE.
> >
> > 2) You are setting InputDataConsumed to 1, but the upper service
> > callback will override the value you set in this pointer with the
> number
> > of packets
> > it received.
> >
> > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much
> more
> > clear
> >
> > 4) if you are not allowing the function keys, do NOT call the upper
> > service callback at all. Just skip over that particular packet and
> you
> > are done. The code I gave you the first time will do this properly.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 04, 2006 11:45 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Keyboard driver problem
> >
> > I hav written a keyboard filter driver, dat will dissable function
> keys,
> > but after installation of my driver non of my key is working, why
> so…
> > Here is code:
> >
> > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataStart,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataEnd,
> > IN OUT PULONG
> > InputDataConsumed
> > )
> > {
> > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > PDEVICE_EXTENSION devExt;
> > KEYBOARD_INPUT_DATA Key[5];
> > BOOLEAN bInsert;
> >
> > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> >
> > if(((InputDataStart->MakeCode >= 0x3b) &&
> > (InputDataStart->MakeCode <=0x44))
> > ||(InputDataStart->MakeCode = 0x133) ||
> > (InputDataStart->MakeCode = 0x134))
> > {
> > bInsert = TRUE;
> > Key[0].MakeCode = 0xFE;
> > Key[0].Flags = 0x00;
> > Key[1].MakeCode = 0xFE;
> > Key[1].Flags = 0x01;
> >
> > InputDataConsumed = 1;
> > }
> > (
(PSERVICE_CALLBACK_ROUTINE)
> > devExt->UpperConnectData.ClassService)(
> > devExt->UpperConnectData.ClassDeviceObject,
> > bInsert ? &Key[0] : InputDataStart,
> > bInsert ? &Key[2] : InputDataEnd,
> > InputDataConsumed);
> >
> >
> > –
> >
> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> –
>

> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com


______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail
storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

No changes are needed. The service callback method works for all
keyboard types, no matter how they are connected to the computer.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Wednesday, January 11, 2006 2:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard driver problem

Thanx Doron,
Now my Keyboard driver is working properly, but i want to use it for USB
keyboard. So kindly suggest me that what changes should i do in my
current driver
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Thu, 5 Jan 2006 08:43:23 -0800

>
> UpperServiceCallback will consume the current packet (pCur) and tell
you
> if it consumed the packet if tmpConsumed == 1 after it returned.
>
> UpperServiceCallback is the same as
> devExt->UpperConnectData.ClassService
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Thursday, January 05, 2006 1:26 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> thanx Doron,
> Ok tel me what
> UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
>
> function will do and where will i get UpperServiceCallback function.
>
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Thu, 5 Jan 2006 00:39:58 -0800
>
> >
> > InputDataStart is an array, not just one packet. InputDataEnd is
one
> > past the end of the array, so you must iterate like I showed you in
my
> > first response over all the packets.
> >
> > 1) bInsert is not initialized, so I would guess it is garbage that
is
> > != FALSE, so you are always reporting 0xFE.
> >
> > 2) You are setting InputDataConsumed to 1, but the upper service
> > callback will override the value you set in this pointer with the
> number
> > of packets
> > it received.
> >
> > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much
> more
> > clear
> >
> > 4) if you are not allowing the function keys, do NOT call the upper
> > service callback at all. Just skip over that particular packet and
> you
> > are done. The code I gave you the first time will do this properly.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 04, 2006 11:45 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Keyboard driver problem
> >
> > I hav written a keyboard filter driver, dat will dissable function
> keys,
> > but after installation of my driver non of my key is working, why
> so…
> > Here is code:
> >
> > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataStart,
> > IN
> > PKEYBOARD_INPUT_DATA InputDataEnd,
> > IN OUT PULONG
> > InputDataConsumed
> > )
> > {
> > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > PDEVICE_EXTENSION devExt;
> > KEYBOARD_INPUT_DATA Key[5];
> > BOOLEAN bInsert;
> >
> > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> >
> > if(((InputDataStart->MakeCode >= 0x3b) &&
> > (InputDataStart->MakeCode <=0x44))
> > ||(InputDataStart->MakeCode = 0x133) ||
> > (InputDataStart->MakeCode = 0x134))
> > {
> > bInsert = TRUE;
> > Key[0].MakeCode = 0xFE;
> > Key[0].Flags = 0x00;
> > Key[1].MakeCode = 0xFE;
> > Key[1].Flags = 0x01;
> >
> > InputDataConsumed = 1;
> > }
> > (
(PSERVICE_CALLBACK_ROUTINE)
> > devExt->UpperConnectData.ClassService)(
> > devExt->UpperConnectData.ClassDeviceObject,
> > bInsert ? &Key[0] : InputDataStart,
> > bInsert ? &Key[2] : InputDataEnd,
> > InputDataConsumed);
> >
> >
> > –
> >
> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB
for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
>
>
> –
>

> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com


______________________________________________
IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

No Doron but it not working with USB Keyboard.
When i m installing it manually via Device Manager,It is saying no driver found.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Wed, 11 Jan 2006 09:13:04 -0800

>
> No changes are needed. The service callback method works for all
> keyboard types, no matter how they are connected to the computer.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 11, 2006 2:54 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> Thanx Doron,
> Now my Keyboard driver is working properly, but i want to use it for USB
> keyboard. So kindly suggest me that what changes should i do in my
> current driver
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Thu, 5 Jan 2006 08:43:23 -0800
>
> >
> > UpperServiceCallback will consume the current packet (pCur) and tell
> you
> > if it consumed the packet if tmpConsumed == 1 after it returned.
> >
> > UpperServiceCallback is the same as
> > devExt->UpperConnectData.ClassService
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Thursday, January 05, 2006 1:26 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] Keyboard driver problem
> >
> > thanx Doron,
> > Ok tel me what
> > UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
> >
> > function will do and where will i get UpperServiceCallback function.
> >
> >
> > ----- Original Message -----
> > From: “Doron Holan”
> > To: “Windows System Software Devs Interest List”
> > Subject: RE: [ntdev] Keyboard driver problem
> > Date: Thu, 5 Jan 2006 00:39:58 -0800
> >
> > >
> > > InputDataStart is an array, not just one packet. InputDataEnd is
> one
> > > past the end of the array, so you must iterate like I showed you in
> my
> > > first response over all the packets.
> > >
> > > 1) bInsert is not initialized, so I would guess it is garbage that
> is
> > > != FALSE, so you are always reporting 0xFE.
> > >
> > > 2) You are setting InputDataConsumed to 1, but the upper service
> > > callback will override the value you set in this pointer with the
> > number
> > > of packets
> > > it received.
> > >
> > > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is much
> > more
> > > clear
> > >
> > > 4) if you are not allowing the function keys, do NOT call the upper
> > > service callback at all. Just skip over that particular packet and
> > you
> > > are done. The code I gave you the first time will do this properly.
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > > Sent: Wednesday, January 04, 2006 11:45 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] Keyboard driver problem
> > >
> > > I hav written a keyboard filter driver, dat will dissable function
> > keys,
> > > but after installation of my driver non of my key is working, why
> > so…
> > > Here is code:
> > >
> > > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > > IN
> > > PKEYBOARD_INPUT_DATA InputDataStart,
> > > IN
> > > PKEYBOARD_INPUT_DATA InputDataEnd,
> > > IN OUT PULONG
> > > InputDataConsumed
> > > )
> > > {
> > > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > > PDEVICE_EXTENSION devExt;
> > > KEYBOARD_INPUT_DATA Key[5];
> > > BOOLEAN bInsert;
> > >
> > > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> > >
> > > if(((InputDataStart->MakeCode >= 0x3b) &&
> > > (InputDataStart->MakeCode <=0x44))
> > > ||(InputDataStart->MakeCode = 0x133) ||
> > > (InputDataStart->MakeCode = 0x134))
> > > {
> > > bInsert = TRUE;
> > > Key[0].MakeCode = 0xFE;
> > > Key[0].Flags = 0x00;
> > > Key[1].MakeCode = 0xFE;
> > > Key[1].Flags = 0x01;
> > >
> > > InputDataConsumed = 1;
> > > }
> > > (
(PSERVICE_CALLBACK_ROUTINE)
> > > devExt->UpperConnectData.ClassService)(
> > > devExt->UpperConnectData.ClassDeviceObject,
> > > bInsert ? &Key[0] : InputDataStart,
> > > bInsert ? &Key[2] : InputDataEnd,
> > > InputDataConsumed);
> > >
> > >
> > > –
> > >
> > > IndiaInfo Mail - the free e-mail service with a difference!
> > > www.indiainfo.com
> > > Check out our value-added Premium features, such as an extra 20MB
> for
> > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument:
> > > ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at >
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument: ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
> > –
> >

> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

Do you have the right hwid in your INF? The HID hw id is different then
the ps2 hwid. You need to also have a section that matches against the
id “HID_DEVICE_SYSTEM_KEYBOARD” and installs kbdhid instead of i8042prt
as the FDO via includes/need directives

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Wednesday, January 11, 2006 9:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard driver problem

No Doron but it not working with USB Keyboard.
When i m installing it manually via Device Manager,It is saying no
driver found.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Wed, 11 Jan 2006 09:13:04 -0800

>
> No changes are needed. The service callback method works for all
> keyboard types, no matter how they are connected to the computer.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 11, 2006 2:54 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> Thanx Doron,
> Now my Keyboard driver is working properly, but i want to use it for
USB
> keyboard. So kindly suggest me that what changes should i do in my
> current driver
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Thu, 5 Jan 2006 08:43:23 -0800
>
> >
> > UpperServiceCallback will consume the current packet (pCur) and tell
> you
> > if it consumed the packet if tmpConsumed == 1 after it returned.
> >
> > UpperServiceCallback is the same as
> > devExt->UpperConnectData.ClassService
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Thursday, January 05, 2006 1:26 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] Keyboard driver problem
> >
> > thanx Doron,
> > Ok tel me what
> > UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
> >
> > function will do and where will i get UpperServiceCallback function.
> >
> >
> > ----- Original Message -----
> > From: “Doron Holan”
> > To: “Windows System Software Devs Interest List”

> > Subject: RE: [ntdev] Keyboard driver problem
> > Date: Thu, 5 Jan 2006 00:39:58 -0800
> >
> > >
> > > InputDataStart is an array, not just one packet. InputDataEnd is
> one
> > > past the end of the array, so you must iterate like I showed you
in
> my
> > > first response over all the packets.
> > >
> > > 1) bInsert is not initialized, so I would guess it is garbage
that
> is
> > > != FALSE, so you are always reporting 0xFE.
> > >
> > > 2) You are setting InputDataConsumed to 1, but the upper service
> > > callback will override the value you set in this pointer with the
> > number
> > > of packets
> > > it received.
> > >
> > > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is
much
> > more
> > > clear
> > >
> > > 4) if you are not allowing the function keys, do NOT call the
upper
> > > service callback at all. Just skip over that particular packet
and
> > you
> > > are done. The code I gave you the first time will do this
properly.
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
Kishra
> > > Sent: Wednesday, January 04, 2006 11:45 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] Keyboard driver problem
> > >
> > > I hav written a keyboard filter driver, dat will dissable function
> > keys,
> > > but after installation of my driver non of my key is working, why
> > so…
> > > Here is code:
> > >
> > > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > > IN
> > > PKEYBOARD_INPUT_DATA InputDataStart,
> > > IN
> > > PKEYBOARD_INPUT_DATA InputDataEnd,
> > > IN OUT PULONG
> > > InputDataConsumed
> > > )
> > > {
> > > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > > PDEVICE_EXTENSION devExt;
> > > KEYBOARD_INPUT_DATA Key[5];
> > > BOOLEAN bInsert;
> > >
> > > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> > >
> > > if(((InputDataStart->MakeCode >= 0x3b) &&
> > > (InputDataStart->MakeCode <=0x44))
> > > ||(InputDataStart->MakeCode = 0x133) ||
> > > (InputDataStart->MakeCode = 0x134))
> > > {
> > > bInsert = TRUE;
> > > Key[0].MakeCode = 0xFE;
> > > Key[0].Flags = 0x00;
> > > Key[1].MakeCode = 0xFE;
> > > Key[1].Flags = 0x01;
> > >
> > > InputDataConsumed = 1;
> > > }
> > > (
(PSERVICE_CALLBACK_ROUTINE)
> > > devExt->UpperConnectData.ClassService)(
> > > devExt->UpperConnectData.ClassDeviceObject,
> > > bInsert ? &Key[0] : InputDataStart,
> > > bInsert ? &Key[2] : InputDataEnd,
> > > InputDataConsumed);
> > >
> > >
> > > –
> > >
> > > IndiaInfo Mail - the free e-mail service with a difference!
> > > www.indiainfo.com
> > > Check out our value-added Premium features, such as an extra 20MB
> for
> > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument:
> > > ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at >
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument: ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
> > –
> >

> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB
for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
>
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

HOw can i manipulate HID_DEVICE_SYSTEM_KEYBOARD, and what are the changes that i havto make in .inf file.
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Wed, 11 Jan 2006 23:12:36 -0800

>
> Do you have the right hwid in your INF? The HID hw id is different then
> the ps2 hwid. You need to also have a section that matches against the
> id “HID_DEVICE_SYSTEM_KEYBOARD” and installs kbdhid instead of i8042prt
> as the FDO via includes/need directives
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 11, 2006 9:46 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> No Doron but it not working with USB Keyboard.
> When i m installing it manually via Device Manager,It is saying no
> driver found.
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Wed, 11 Jan 2006 09:13:04 -0800
>
> >
> > No changes are needed. The service callback method works for all
> > keyboard types, no matter how they are connected to the computer.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 11, 2006 2:54 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] Keyboard driver problem
> >
> > Thanx Doron,
> > Now my Keyboard driver is working properly, but i want to use it for
> USB
> > keyboard. So kindly suggest me that what changes should i do in my
> > current driver
> > ----- Original Message -----
> > From: “Doron Holan”
> > To: “Windows System Software Devs Interest List”
> > Subject: RE: [ntdev] Keyboard driver problem
> > Date: Thu, 5 Jan 2006 08:43:23 -0800
> >
> > >
> > > UpperServiceCallback will consume the current packet (pCur) and tell
> > you
> > > if it consumed the packet if tmpConsumed == 1 after it returned.
> > >
> > > UpperServiceCallback is the same as
> > > devExt->UpperConnectData.ClassService
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > > Sent: Thursday, January 05, 2006 1:26 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] Keyboard driver problem
> > >
> > > thanx Doron,
> > > Ok tel me what
> > > UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
> > >
> > > function will do and where will i get UpperServiceCallback function.
> > >
> > >
> > > ----- Original Message -----
> > > From: “Doron Holan”
> > > To: “Windows System Software Devs Interest List”
>
> > > Subject: RE: [ntdev] Keyboard driver problem
> > > Date: Thu, 5 Jan 2006 00:39:58 -0800
> > >
> > > >
> > > > InputDataStart is an array, not just one packet. InputDataEnd is
> > one
> > > > past the end of the array, so you must iterate like I showed you
> in
> > my
> > > > first response over all the packets.
> > > >
> > > > 1) bInsert is not initialized, so I would guess it is garbage
> that
> > is
> > > > != FALSE, so you are always reporting 0xFE.
> > > >
> > > > 2) You are setting InputDataConsumed to 1, but the upper service
> > > > callback will override the value you set in this pointer with the
> > > number
> > > > of packets
> > > > it received.
> > > >
> > > > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is
> much
> > > more
> > > > clear
> > > >
> > > > 4) if you are not allowing the function keys, do NOT call the
> upper
> > > > service callback at all. Just skip over that particular packet
> and
> > > you
> > > > are done. The code I gave you the first time will do this
> properly.
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
> Kishra
> > > > Sent: Wednesday, January 04, 2006 11:45 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] Keyboard driver problem
> > > >
> > > > I hav written a keyboard filter driver, dat will dissable function
> > > keys,
> > > > but after installation of my driver non of my key is working, why
> > > so…
> > > > Here is code:
> > > >
> > > > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > > > IN
> > > > PKEYBOARD_INPUT_DATA InputDataStart,
> > > > IN
> > > > PKEYBOARD_INPUT_DATA InputDataEnd,
> > > > IN OUT PULONG
> > > > InputDataConsumed
> > > > )
> > > > {
> > > > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > > > PDEVICE_EXTENSION devExt;
> > > > KEYBOARD_INPUT_DATA Key[5];
> > > > BOOLEAN bInsert;
> > > >
> > > > devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
> > > >
> > > > if(((InputDataStart->MakeCode >= 0x3b) &&
> > > > (InputDataStart->MakeCode <=0x44))
> > > > ||(InputDataStart->MakeCode = 0x133) ||
> > > > (InputDataStart->MakeCode = 0x134))
> > > > {
> > > > bInsert = TRUE;
> > > > Key[0].MakeCode = 0xFE;
> > > > Key[0].Flags = 0x00;
> > > > Key[1].MakeCode = 0xFE;
> > > > Key[1].Flags = 0x01;
> > > >
> > > > InputDataConsumed = 1;
> > > > }
> > > > (
(PSERVICE_CALLBACK_ROUTINE)
> > > > devExt->UpperConnectData.ClassService)(
> > > > devExt->UpperConnectData.ClassDeviceObject,
> > > > bInsert ? &Key[0] : InputDataStart,
> > > > bInsert ? &Key[2] : InputDataEnd,
> > > > InputDataConsumed);
> > > >
> > > >
> > > > –
> > > >
> > > > IndiaInfo Mail - the free e-mail service with a difference!
> > > > www.indiainfo.com
> > > > Check out our value-added Premium features, such as an extra 20MB
> > for
> > > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument:
> > > > ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at > >
> > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument: ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> > > –
> > >

> > > IndiaInfo Mail - the free e-mail service with a difference!
> > > www.indiainfo.com
> > > Check out our value-added Premium features, such as an extra 20MB
> for
> > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument:
> > > ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at >
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument: ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
> > –
> >
> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> –
>

> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com


______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

Please read the ddk. I have held your hand a lot over the past weeks, I
think I have practically written your entire project from the questions
you have asked. It’s time to figure some of this out on your own…

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
Sent: Friday, January 13, 2006 1:50 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard driver problem

HOw can i manipulate HID_DEVICE_SYSTEM_KEYBOARD, and what are the
changes that i havto make in .inf file.
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Wed, 11 Jan 2006 23:12:36 -0800

>
> Do you have the right hwid in your INF? The HID hw id is different
then
> the ps2 hwid. You need to also have a section that matches against
the
> id “HID_DEVICE_SYSTEM_KEYBOARD” and installs kbdhid instead of
i8042prt
> as the FDO via includes/need directives
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Wednesday, January 11, 2006 9:46 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> No Doron but it not working with USB Keyboard.
> When i m installing it manually via Device Manager,It is saying no
> driver found.
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Wed, 11 Jan 2006 09:13:04 -0800
>
> >
> > No changes are needed. The service callback method works for all
> > keyboard types, no matter how they are connected to the computer.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 11, 2006 2:54 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] Keyboard driver problem
> >
> > Thanx Doron,
> > Now my Keyboard driver is working properly, but i want to use it for
> USB
> > keyboard. So kindly suggest me that what changes should i do in my
> > current driver
> > ----- Original Message -----
> > From: “Doron Holan”
> > To: “Windows System Software Devs Interest List”

> > Subject: RE: [ntdev] Keyboard driver problem
> > Date: Thu, 5 Jan 2006 08:43:23 -0800
> >
> > >
> > > UpperServiceCallback will consume the current packet (pCur) and
tell
> > you
> > > if it consumed the packet if tmpConsumed == 1 after it returned.
> > >
> > > UpperServiceCallback is the same as
> > > devExt->UpperConnectData.ClassService
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
Kishra
> > > Sent: Thursday, January 05, 2006 1:26 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] Keyboard driver problem
> > >
> > > thanx Doron,
> > > Ok tel me what
> > > UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
> > >
> > > function will do and where will i get UpperServiceCallback
function.
> > >
> > >
> > > ----- Original Message -----
> > > From: “Doron Holan”
> > > To: “Windows System Software Devs Interest List”
>
> > > Subject: RE: [ntdev] Keyboard driver problem
> > > Date: Thu, 5 Jan 2006 00:39:58 -0800
> > >
> > > >
> > > > InputDataStart is an array, not just one packet. InputDataEnd
is
> > one
> > > > past the end of the array, so you must iterate like I showed you
> in
> > my
> > > > first response over all the packets.
> > > >
> > > > 1) bInsert is not initialized, so I would guess it is garbage
> that
> > is
> > > > != FALSE, so you are always reporting 0xFE.
> > > >
> > > > 2) You are setting InputDataConsumed to 1, but the upper service
> > > > callback will override the value you set in this pointer with
the
> > > number
> > > > of packets
> > > > it received.
> > > >
> > > > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is
> much
> > > more
> > > > clear
> > > >
> > > > 4) if you are not allowing the function keys, do NOT call the
> upper
> > > > service callback at all. Just skip over that particular packet
> and
> > > you
> > > > are done. The code I gave you the first time will do this
> properly.
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
> Kishra
> > > > Sent: Wednesday, January 04, 2006 11:45 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] Keyboard driver problem
> > > >
> > > > I hav written a keyboard filter driver, dat will dissable
function
> > > keys,
> > > > but after installation of my driver non of my key is working,
why
> > > so…
> > > > Here is code:
> > > >
> > > > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > > > IN
> > > > PKEYBOARD_INPUT_DATA InputDataStart,
> > > > IN
> > > > PKEYBOARD_INPUT_DATA InputDataEnd,
> > > > IN OUT
PULONG
> > > > InputDataConsumed
> > > > )
> > > > {
> > > > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > > > PDEVICE_EXTENSION devExt;
> > > > KEYBOARD_INPUT_DATA Key[5];
> > > > BOOLEAN bInsert;
> > > >
> > > > devExt = (PDEVICE_EXTENSION)
DeviceObject->DeviceExtension;
> > > >
> > > > if(((InputDataStart->MakeCode >= 0x3b) &&
> > > > (InputDataStart->MakeCode <=0x44))
> > > > ||(InputDataStart->MakeCode = 0x133) ||
> > > > (InputDataStart->MakeCode = 0x134))
> > > > {
> > > > bInsert = TRUE;
> > > > Key[0].MakeCode = 0xFE;
> > > > Key[0].Flags = 0x00;
> > > > Key[1].MakeCode = 0xFE;
> > > > Key[1].Flags = 0x01;
> > > >
> > > > InputDataConsumed = 1;
> > > > }
> > > > (
(PSERVICE_CALLBACK_ROUTINE)
> > > > devExt->UpperConnectData.ClassService)(
> > > > devExt->UpperConnectData.ClassDeviceObject,
> > > > bInsert ? &Key[0] : InputDataStart,
> > > > bInsert ? &Key[2] : InputDataEnd,
> > > > InputDataConsumed);
> > > >
> > > >
> > > > –
> > > >
> > > > IndiaInfo Mail - the free e-mail service with a difference!
> > > > www.indiainfo.com
> > > > Check out our value-added Premium features, such as an extra
20MB
> > for
> > > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument:
> > > > ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at > >
> > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument: ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> > > –
> > >

> > > IndiaInfo Mail - the free e-mail service with a difference!
> > > www.indiainfo.com
> > > Check out our value-added Premium features, such as an extra 20MB
> for
> > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument:
> > > ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at >
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument: ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
> > –
> >
> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB
for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to
xxxxx@lists.osr.com
>
>
> –
>

> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com


______________________________________________
IndiaInfo Mail - the free e-mail service with a difference!
www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for
mail storage, POP3, e-mail forwarding, and ads-free mailboxes!


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Doron,
I hav made my USB driver to work properly.
I just made changes in .inf file.
And your havnt helped me in my project, in my project i was only making mistake in call back function.
But any ways thanx for all ur support.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Subject: RE: [ntdev] Keyboard driver problem
Date: Fri, 13 Jan 2006 09:54:47 -0800

>
> Please read the ddk. I have held your hand a lot over the past weeks, I
> think I have practically written your entire project from the questions
> you have asked. It’s time to figure some of this out on your own…
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> Sent: Friday, January 13, 2006 1:50 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Keyboard driver problem
>
> HOw can i manipulate HID_DEVICE_SYSTEM_KEYBOARD, and what are the
> changes that i havto make in .inf file.
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] Keyboard driver problem
> Date: Wed, 11 Jan 2006 23:12:36 -0800
>
> >
> > Do you have the right hwid in your INF? The HID hw id is different
> then
> > the ps2 hwid. You need to also have a section that matches against
> the
> > id “HID_DEVICE_SYSTEM_KEYBOARD” and installs kbdhid instead of
> i8042prt
> > as the FDO via includes/need directives
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > Sent: Wednesday, January 11, 2006 9:46 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] Keyboard driver problem
> >
> > No Doron but it not working with USB Keyboard.
> > When i m installing it manually via Device Manager,It is saying no
> > driver found.
> >
> > ----- Original Message -----
> > From: “Doron Holan”
> > To: “Windows System Software Devs Interest List”
> > Subject: RE: [ntdev] Keyboard driver problem
> > Date: Wed, 11 Jan 2006 09:13:04 -0800
> >
> > >
> > > No changes are needed. The service callback method works for all
> > > keyboard types, no matter how they are connected to the computer.
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky Kishra
> > > Sent: Wednesday, January 11, 2006 2:54 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] Keyboard driver problem
> > >
> > > Thanx Doron,
> > > Now my Keyboard driver is working properly, but i want to use it for
> > USB
> > > keyboard. So kindly suggest me that what changes should i do in my
> > > current driver
> > > ----- Original Message -----
> > > From: “Doron Holan”
> > > To: “Windows System Software Devs Interest List”
>
> > > Subject: RE: [ntdev] Keyboard driver problem
> > > Date: Thu, 5 Jan 2006 08:43:23 -0800
> > >
> > > >
> > > > UpperServiceCallback will consume the current packet (pCur) and
> tell
> > > you
> > > > if it consumed the packet if tmpConsumed == 1 after it returned.
> > > >
> > > > UpperServiceCallback is the same as
> > > > devExt->UpperConnectData.ClassService
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
> Kishra
> > > > Sent: Thursday, January 05, 2006 1:26 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] Keyboard driver problem
> > > >
> > > > thanx Doron,
> > > > Ok tel me what
> > > > UpperServiceCallback(UpperContext, pCur, pCur+1, &tmpConsumed);
> > > >
> > > > function will do and where will i get UpperServiceCallback
> function.
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: “Doron Holan”
> > > > To: “Windows System Software Devs Interest List”
> >
> > > > Subject: RE: [ntdev] Keyboard driver problem
> > > > Date: Thu, 5 Jan 2006 00:39:58 -0800
> > > >
> > > > >
> > > > > InputDataStart is an array, not just one packet. InputDataEnd
> is
> > > one
> > > > > past the end of the array, so you must iterate like I showed you
> > in
> > > my
> > > > > first response over all the packets.
> > > > >
> > > > > 1) bInsert is not initialized, so I would guess it is garbage
> > that
> > > is
> > > > > != FALSE, so you are always reporting 0xFE.
> > > > >
> > > > > 2) You are setting InputDataConsumed to 1, but the upper service
> > > > > callback will override the value you set in this pointer with
> the
> > > > number
> > > > > of packets
> > > > > it received.
> > > > >
> > > > > 3) instead of using 0x01 for the Flags, use KEY_BREAK which is
> > much
> > > > more
> > > > > clear
> > > > >
> > > > > 4) if you are not allowing the function keys, do NOT call the
> > upper
> > > > > service callback at all. Just skip over that particular packet
> > and
> > > > you
> > > > > are done. The code I gave you the first time will do this
> > properly.
> > > > >
> > > > > d
> > > > >
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Vikky
> > Kishra
> > > > > Sent: Wednesday, January 04, 2006 11:45 PM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: [ntdev] Keyboard driver problem
> > > > >
> > > > > I hav written a keyboard filter driver, dat will dissable
> function
> > > > keys,
> > > > > but after installation of my driver non of my key is working,
> why
> > > > so…
> > > > > Here is code:
> > > > >
> > > > > VOID KbFilter_ServiceCallback(IN PDEVICE_OBJECT DeviceObject,
> > > > > IN
> > > > > PKEYBOARD_INPUT_DATA InputDataStart,
> > > > > IN
> > > > > PKEYBOARD_INPUT_DATA InputDataEnd,
> > > > > IN OUT
> PULONG
> > > > > InputDataConsumed
> > > > > )
> > > > > {
> > > > > // DbgPrint(“KbFilter_ServiceCallback Called”);
> > > > > PDEVICE_EXTENSION devExt;
> > > > > KEYBOARD_INPUT_DATA Key[5];
> > > > > BOOLEAN bInsert;
> > > > >
> > > > > devExt = (PDEVICE_EXTENSION)
> DeviceObject->DeviceExtension;
> > > > >
> > > > > if(((InputDataStart->MakeCode >= 0x3b) &&
> > > > > (InputDataStart->MakeCode <=0x44))
> > > > > ||(InputDataStart->MakeCode = 0x133) ||
> > > > > (InputDataStart->MakeCode = 0x134))
> > > > > {
> > > > > bInsert = TRUE;
> > > > > Key[0].MakeCode = 0xFE;
> > > > > Key[0].Flags = 0x00;
> > > > > Key[1].MakeCode = 0xFE;
> > > > > Key[1].Flags = 0x01;
> > > > >
> > > > > InputDataConsumed = 1;
> > > > > }
> > > > > (
(PSERVICE_CALLBACK_ROUTINE)
> > > > > devExt->UpperConnectData.ClassService)(
> > > > > devExt->UpperConnectData.ClassDeviceObject,
> > > > > bInsert ? &Key[0] : InputDataStart,
> > > > > bInsert ? &Key[2] : InputDataEnd,
> > > > > InputDataConsumed);
> > > > >
> > > > >
> > > > > –
> > > > >
> > > > > IndiaInfo Mail - the free e-mail service with a difference!
> > > > > www.indiainfo.com
> > > > > Check out our value-added Premium features, such as an extra
> 20MB
> > > for
> > > > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > > argument:
> > > > > ‘’
> > > > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at > > >
> > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > > argument: ‘’
> > > > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > > >
> > > >
> > > > –
> > > >

> > > > IndiaInfo Mail - the free e-mail service with a difference!
> > > > www.indiainfo.com
> > > > Check out our value-added Premium features, such as an extra 20MB
> > for
> > > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument:
> > > > ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at > >
> > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > > argument: ‘’
> > > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> > > –
> > >
> > > IndiaInfo Mail - the free e-mail service with a difference!
> > > www.indiainfo.com
> > > Check out our value-added Premium features, such as an extra 20MB
> for
> > > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument:
> > > ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at >
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> > argument: ‘’
> > > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
> > –
> >

> > IndiaInfo Mail - the free e-mail service with a difference!
> > www.indiainfo.com
> > Check out our value-added Premium features, such as an extra 20MB for
> > mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> > ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> –
>
> IndiaInfo Mail - the free e-mail service with a difference!
> www.indiainfo.com
> Check out our value-added Premium features, such as an extra 20MB for
> mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com



IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!