Hi dafeu ,
You can see sample serial driver program in NT DDK in the directory
Ddk\src\comm\serial.
I found the main driver program file is “initunlo.c” and the Dispatch
routine (ie, the Function which will be invoked when an ioctl comes.) in the
“SerialIoControl” function of “ioctl.c”.
You can add a ioctl in your application like example
shown below.
#define IOCTL_SCAN_PCI_BUS CTL_CODE( FILE_DEVICE_UNKNOWN, 0x900,
METHOD_BUFFERED, FILE_READ_ACCESS )
And send via DeviceIoControl function.
After that you can add a case condition in the switch
statement of “SerialIocontol” function of “ioctl.c” .
Ie,
switch
(IrpSp->Parameters.DeviceIoControl.IoControlCode)"
case IOCTL_SCAN_PCI_BUS:
…
…//Add your functions
Hope this help…
Muhammad Faizal
NeST, India
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
-----Original Message-----
From: Dafeu Michal [mailto:xxxxx@yahoo.com]
Sent: Saturday, October 14, 2000 8:53 AM
To: NT Developers Interest List
Subject: [ntdev] Serial Driver
Hi everybody,
My question is simple: I used the serial driver
provided by the ddk (src \ kernel \ serial ), but I
want to add a reset function. But when I looked inside
this driver, I don’t understand how can I add a new
ioctl?
Does anybody ever try this?
TIA
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It’s FREE.
http://im.yahoo.com/
You are currently subscribed to ntdev as: xxxxx@nestec.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)