Hi Doran,
Sorry for delay in response…
i meant in my PnP dispatch routine, for minor function the IRP_MN_REMOVE_DEVICE
i need to detach my filter and also in the AddDevice routine i would attach
my filter… so correct words are “attach and detach” rather then “loading and unloading”.
Now i have come up with filter skeleton driver…
Now to make this device specific filter instead of class filter,
in the inf file i need to make the following entry in the AddReg section
HKR,“UpperFilters”,0x00010000,“vspDevUpr” and have followed the filter.inf
sample from the Toaster example to come up with independent inf file there by to attach
to the underlying the virtual serial port driver.
The Key things i thought were, AddReg and AddService section in INF file.
Am i missing some thing here?
When i install the driver through the my INF File,
AddDevice routine do get called but it is not attaching to the right target device,
Physical device object I am getting is not one which intended to get attached?
My INf File look like this:
[Version]
Signature=$CHICAGO$
Class=PORTS
ClassGUID={4d36e97e-e325-11ce-bfc1-08002be10318} ;got from the vendor given inf file
Provider=%MFGNAME%
[Manufacturer]
%MFGNAME%=DeviceList
[DestinationDirs]
DefaultDestDir=10,System32\Drivers
[SourceDisksFiles]
vspDevUpr.sys=1
[SourceDisksNames]
1=%INSTDISK%,i386
[DeviceList]
%DESCRIPTION%=DriverInstall, vspDevUpr
;------------------------------------------------------------------------------
; Windows 2000 Sections
;------------------------------------------------------------------------------
[DriverInstall.NT]
CopyFiles=DriverCopyFiles
[DriverCopyFiles]
vspDevUpr.sys,2
[DriverInstall.nt.hw]
AddReg=DriverHwAddReg
;
; Service installation
;
[DriverInstall.NT.Services]
AddService = USA19H2KP, 0x00000002, USA19HPORT.AddService
AddService = vspDevUpr,0x00000002,vspDevUprService.AddService
[DriverHwAddReg]
HKR,“UpperFilters”,0x00010000,“vspDevUpr”
[USA19HPORT.AddService]
DisplayName = %USA19HPORT.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\USA19H2kp.SYS
[vspDevUprService.AddService]
ServiceType=1 ; SERVICE_KERNEL_DRIVER
StartType=3 ; SERVICE_DEMAND_START
ErrorControl=1 ; SERVICE_ERROR_NORMAL
ServiceBinary=%12%\system32\drivers\vspDevUpr.sys
;LoadOrderGroup = Extended Base
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
[Strings]
MFGNAME=“xxx”
INSTDISK=“xxx Installation Disc”
DESCRIPTION=“vspDevUpr Driver”
FRIENDLYNAME=“vspDevUpr Driver”
-Thanks and regards
Narahari
Doron Holan
xxxxx@microsoft.com Join Date: 08 Sep 2005
Posts To This List: 3041
RE: Filter Driver for USB-RS232 driver.
You can install a filter using a seperate inf withoutn touching the orig
inf…but can you explain why you think you need a filter to begin with?
Portmon does not use pnp to attach to the port device object. Rather it
attaches to the devobj by using the fixed name of the devobj. This is not a
method that should be used by production code though.
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: xxxxx@gmail.com
Sent: Friday, October 24, 2008 2:43 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Filter Driver for USB-RS232 driver.
Hi All,
I am making use of USB-RS232 convertor, I need to attach a filter driver
over the
virtual serial port created.
For this i think we need to modify the AddReg section of the INF file. Also
currently
the serenum section in the vendor specified driver has been commented
I couldn’t modify this entry since it was protected by security catlog file.
But I have observed that PortMon is able to attach to the virtual serial
port created.
Doesn’t PortMon makes use of Serenum?
So my questions is what would be a good approach to attach a filter driver
to serial
port driver whenever i plug the USB-RS232 convertor, when the option to
modify the
USB-RS232 inf file is not possible?
Thanks in advance