how to register a device interface

I am developing a usb device driver for usb keyborad
I am confused that what GUID and class name shoud I give to it. in INF file.

when I am registering the device interface as given below

status = IoRegisterDeviceInterface(
PhysicalDeviceObject,
(LPGUID) &GUID_DEVINTERFACE_KEYBOARD,
NULL,
fdoData->InterfaceName);

it gives an error

error LNK2001: unresolved external symbol _GUID_DEVCLASS_KEYBOARD

I have inluded header files ntddkbd.h and devguid.h both…
Can you tell mewhere am I making the mistake?

You need to #define INITGUID before including either of these headers.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, March 25, 2008 11:53 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to register a device interface

I am developing a usb device driver for usb keyborad
I am confused that what GUID and class name shoud I give to it. in INF file.

when I am registering the device interface as given below

status = IoRegisterDeviceInterface(
PhysicalDeviceObject,
(LPGUID) &GUID_DEVINTERFACE_KEYBOARD,
NULL,
fdoData->InterfaceName);

it gives an error

error LNK2001: unresolved external symbol _GUID_DEVCLASS_KEYBOARD

I have inluded header files ntddkbd.h and devguid.h both…
Can you tell mewhere am I making the mistake?


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