The short answer is that your driver and serial.sys can coexist on the
machine as long as there are devices for each service to control. Both
driver cannot control the same instance of hw.
Are you are replacing serial.sys for a motherboard serial port? Or a
custom UART that you are shipping? If it is a custom solution, just
write and INF that matches your HW ID to your driver and you are done.
If you are replacing serial.sys for a motherboard serial port, then you
upgrade the installed driver on just that serial port. All applications
which open that particular serial port will use your driver. If there
are other serial ports on the machine, they will not be affected by your
driver b/c they are still running with the original serial.sys
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of elena nito
Sent: Thursday, April 14, 2005 1:07 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] custom IOCTL in serial.sys
Doron,
thanks for your explanations. I’ve got another question:
Can both serial.sys and my custom driver (e.g. serial2.sys) coexist? I
mean that my application would access serial2.sys, while the other ones
would access serial.sys. By this way, it wouldn’t be necessary to
replace serial.sys, avoiding the lost of possible innovations introduced
to it in newer SPs, that could be used by applications other than mine.
Regards
En/na Doron Holan ha escrit:
As a filter driver you are not allowed ot touch the hw resources, only
serial.sys is allowed. If you need hw access, a filter is not
appropriate and you need to replace serial.sys w/your own driver.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of elena nito
Sent: Wednesday, April 13, 2005 9:14 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] custom IOCTL in serial.sys
hi again,
I used serial.sys source coce included in win2000 ddk. I don’t know if
the IOCTL I need is included in the last ddk version, but I don’t
think
so, because it’s not mentioned elsewhere.
I also think it’s better to put it in a filter driver, but I’m a
begginer, and I don’t know exactly how to do it. I understand that I
should pass down all IRPs except mine, and I think I’m able to get it
work, but I don’t really know how to put my filter driver between
serenum.sys and serial.sys.
And, again, I’m affraid of a hardware conflict if I try to access the
same register from my filter and serial.sys at the same time. Maybe
it’s
only a beginner scare…
Can you give me basic clues which show me the good path?
Thank you very much for your help.
En/na Doron Holan ha escrit:
>If you upgrade the devnode to your driver (which does not have the
name
>serial), serial.sys will be unloaded and our driver will load. This
>will survive an SP in place upgrade.
>
>Mats suggestion of a filter driver should be strongly considered. If
>you can do that, your life will be easier. Are you sure the native
>serial does not support what you want? It has a very rich interface,
it
>is easily to lose yourself in it.
>
>d
>
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of Mats PETERSSON
>Sent: Wednesday, April 13, 2005 8:06 AM
>To: Windows System Software Devs Interest List
>Subject: Re: [ntdev] custom IOCTL in serial.sys
>
>
>
>
>
>
>I don’t actually know if this works, but I believe the principle when
>you
>want to add (or remove or change) the functionality of an existing “in
>the
>box” driver is that you write a filter-driver that sits on top of (or
>below) the driver you are “changing”.
>
>In this case, you’d implement your IOCTL in the filter driver, and
pass
>all
>other IRPs to the serial driver below. Of course, you’re not actually
>supposed to touch the hardware in the filter driver, but I think in
this
>case it’s relatively safe to do so.
>
>It’s a big no-no to replace “in-the-box” drivers, as that tends to
break
>things when the next service-pack comes out with an updated "in the
box"
>driver. Since Windows doesn’t actually know that Serial.sys and
>Serial2.sys
>handle the same hardware, it wouldn’t be able to prevent the existing
>serial.sys from being loaded, and if you just go modify the PnP
settings
>in
>the registry (or whatever), then you’ll confuse all sorts of things.
>
>–
>Mats
>
>xxxxx@lists.osr.com wrote on 04/13/2005 03:45:35 PM:
>
>
>
>>Hello,
>>
>>I’m developping a serial aplication, in which I need to read the
>
>UART’s
>
>
>>Line Status Register. I haven’t found any standard IOCTL to use with
>>DeviceIoControl() which reads this register, so I’ve edited the
source
>>of serial.sys and added my custom IOCTL. Then I tested it by
replacing
>>the original serial.sys by mine, and it works ok.
>>
>>But now, if I want to distribute my driver, I should replace the
>>original driver, and I don’t know if it’s really a good idea.
>>Another possibility could be to build another driver (and name it
>>serial2.sys, for example), and make my application access this other
>>one, but I think it would carry to hardware access conflicts.
>>
>>Can anyone advice me? What is the best and most secure solution?
>>
>>Thanks.
>>
>>—
>>Questions? First check the Kernel Driver FAQ at http://www.
>>osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: xxxxx@3dlabs.com
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>>ForwardSourceID:NT00010A22
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>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: xxxxx@windows.microsoft.com
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: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com