IOCTL Definitions

Dear Team,

The step4 of USB UMDF OSR fx2_driver implements the device io controls in the controlqueue.cpp file. In the switch case there is a control code named IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY which is not defined anywhere in the folder.

If I want to add new ioctl code, do I need to use some tools like guid generator or I can define them in one of the include headers.

Regards.

The sources file will give you a very big clue as to where the define is made

INCLUDES=$(INCLUDES);…..\inc

d:\WinDDK\6000\src\umdf\usb\fx2_driver\step4>dir …..\inc
Volume in drive D has no label.
Volume Serial Number is 8CC7-8E97

Directory of d:\WinDDK\6000\src\umdf\usb\inc

06/05/2007 09:59 AM

.
06/05/2007 09:59 AM ..
11/02/2006 01:56 AM 1,223 list.h
06/05/2007 09:59 AM 5,083 public.h
11/02/2006 01:56 AM 6,585 usb_hw.h
11/02/2006 01:56 AM 686 WUDFOsrUsbPublic.h

d:\WinDDK\6000\src\umdf\usb\fx2_driver\step4>findstr IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY ..\..\inc\*
..\..\inc\public.h:#define IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY CTL_CODE(FILE_DEVICE_OSRUSBFX2,\

IOCTLs are not globally unique, you can define whatever value you want to use in the header

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, October 18, 2007 2:59 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IOCTL Definitions

Dear Team,

The step4 of USB UMDF OSR fx2_driver implements the device io controls in the controlqueue.cpp file. In the switch case there is a control code named IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY which is not defined anywhere in the folder.

If I want to add new ioctl code, do I need to use some tools like guid generator or I can define them in one of the include headers.

Regards.

---
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

Thanks for the pointer. As suggested, I found them in public.h which is a common header file between the driver and the application. In the process I understood the way to define the IOCTL using CT_CODE macro.

Regards.