- WdfDeviceCreateDeviceInterface Again
- Posted by tfedricks@gmail.com on June 5th, 2007
After installing the driver, i dont see the callback
EvtDeviceFileCreate() being called in Vista. This callback is called
in XP at installation time. Is this the problem with device stack?
The callback is called only when there is CreateFile() from the
application.
Thank You.
Regards,
Tim
- Posted by tfedricks@gmail.com on June 6th, 2007
Doron/Eliyas,
Please answer my above queries and guide me if im going wrong. Its
already 5 days since i posted my last query.
Let me know if you need any other information.
Thank You.
Regards,
Tim
- Posted by Eliyas Yakub [MSFT] on June 7th, 2007
EvtDeviceFileCreate is not called during install because the serenum might
not be part of the stack to send create. Can you check on that?
Are you using the same INF package to install on XP and Vista?
Now whether or not you want the serenum on top of the serial driver is up to
you. Serenum provides functionality to enumerate certain known devices that
connect to the port. If the device that you connect to the port is not going
to be enumerated as a new device then you don't need serenum. Read the DDK
documentation on serial driver.
-Eliyas
<tfedricks@gmail.com> wrote in message
news:1181053674.372991.223780@w5g2000hsg.googlegro ups.com...
- Posted by tfedricks@gmail.com on June 7th, 2007
Eliyas,
I want serenum to be part of my stack, and included the same in INF
file, but the !devstack does not show serenum included in the stack.
But in case of XP, the !devstack clearly shows serenum in the
stack. I have posted the !devstack output for both XP and Vista in my
previous post. Please see above
Im using the same INF file for both XP and Vista. I have posted the
INF file at the end of this thread.
I want serenum to be part of stack so that it can enumerate standard
serial mouse and keyboards devices when i attach them. Is there any
other way to mention, so that serenum to be upper filter to serial
driver.
Let me know if you need any other information. Your suggestions are
appreciable.
Thank You.
Regards,
Madhukar
[Version]
Signature="$WINDOWS NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%OnChipInc%
DriverVer=05/01/2007,1.0.5.6000
[DestinationDirs]
DefaultDestDir = 11
[SourceDisksNames]
1=%DiskString%,"OnChipSerUSB",,
[SourceDisksFiles]
usbserdrv.sys = 1
;
-----------------------------------------------------------------------------
; Table of Contents: manufacturer, then devices.
;
-----------------------------------------------------------------------------
[Manufacturer]
%OnChipSer%=OnChipSer,NTx86
;
-----------------------------------------------------------------------------
; The devices
;
-----------------------------------------------------------------------------
[OnChipSer]
%OnChipSer.Com.Desc% = OnChipSerSER.Install, Serport\VID_0f2f_com
;
-----------------------------------------------------------------------------
; The devices
;
-----------------------------------------------------------------------------
[OnChipSer.NTx86]
%OnChipSer.Com.Desc% = OnChipSerSER.Install, Serport\VID_0f2f_com
;
-----------------------------------------------------------------------------
; Class Installer
;
-----------------------------------------------------------------------------
[ClassInstall32.NT]
AddReg=PortsClass.NT.AddReg
[PortsClass.NT.AddReg]
HKR,,,,%PortsClassName%
HKR,,Icon,,"-23"
HKR,,Installer32,,"MsPorts.Dll,PortsClassInstaller "
;
-----------------------------------------------------------------------------
; How to install the WDM driver on NT
;
-----------------------------------------------------------------------------
[OnChipSerSER.Install.NT]
Include=msports.inf
Needs=SerialEnumerator.NT
CopyFiles = OnChipSerSER.NT.CopyFiles
AddReg = OnChipSerSER.NT.AddReg
; addreg and copy files for serenum.sys
;
-----------------------------------------------------------------------------
; How to start the WDM driver on NT
;
-----------------------------------------------------------------------------
[OnChipSerSER.Install.NT.Services]
Include=msports.inf
Needs=SerialEnumerator.NT.Services
AddService = Serusbvista, 0x00000002,
OnChipSerSER.AddService
; install the serenum service itself
[OnChipSerSER.AddService]
DisplayName = %OnChipSer.Com.ServiceDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbserdrv.sys
LoadOrderGroup = Extended Base
;
-----------------------------------------------------------------------------
; WDM registry entries (NT only)
;
-----------------------------------------------------------------------------
[OnChipSerSER.NT.AddReg]
HKR,,PortSubClass,1,01
HKR,,EnumpropPages32,,"MsPorts.dll,SerialPortPropP ageProvider"
;
-----------------------------------------------------------------------------
; The WDM copy list for NT -- different because things go in
; different places.
;
-----------------------------------------------------------------------------
[OnChipSerSER.NT.CopyFiles]
;usbserdrv.sys
;
-----------------------------------------------------------------------------
; The Hardware list for NT. This comes from msports.inf for
ComPorts.
;
-----------------------------------------------------------------------------
[OnChipSerSER.Install.NT.HW]
AddReg = OnChipSerSER.NT.HW.AddReg
[OnChipSerSER.NT.HW.AddReg]
HKR,,"UpperFilters", 0x00010000, "serenum"
[DestinationDirs]
OnChipSerSER_Device_CoInstaller_CopyFiles = 11
[OnChipSerSER_Device.NT.CoInstallers]
AddReg=OnChipSerSER_Device_CoInstaller_AddReg
CopyFiles=OnChipSerSER_Device_CoInstaller_CopyFile s
[OnChipSerSER_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,
"wdfcoinstaller01005.dll,WdfCoInstaller"
[OnChipSerSER_Device_CoInstaller_CopyFiles]
wdfcoinstaller01005.dll
[SourceDisksFiles]
wdfcoinstaller01005.dll=1 ; make sure the number matches with
SourceDisksNames
[OnChipSerSER_Device.NT.Wdf]
KmdfService = OnChipSerSER, OnChipSerSER_wdfsect
[OnChipSerSER_wdfsect]
KmdfLibraryVersion = 1.5
;
-----------------------------------------------------------------------------
; Localizable Strings
;
-----------------------------------------------------------------------------
[Strings]
OnChipInc="OnChip Technologies"
DiskString= " "
PortsClassName= "USB Serial Port"
OnChipSer= "OnChip Technologies"
OnChipSer.Com.ServiceDesc = Serial Port Driver "
DiskId = "OnChip Ser Installation Disk "
OnChipSer.Com.Desc = "USB Serial Port"
- Posted by Eliyas Yakub [MSFT] on June 7th, 2007
I will look at the INF later today. Can you make sure by looking at the Enum
registry whether serenum is listed as upper filter for your device? It
should be under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\A PCI\PNP0501
If it's not listed there then we have an installation issue. You should then
look at the setupapi log to see if it parses the section. Also run chkinf
utility on the INF to make sure there are no errors.
If the serenum service is listed then I think the driver is probably failing
the AddDevice. If a filter driver fails AddDevice, system would silently
ignore and build the rest of the stack. So set a breakpoint on sereenum
driver-entry and see if you can step thru the AddDevice routine.
kd> sxe ld:serenum
the above would set a load on module exception on serenum. If you hit this
then the serenum is getting loaded. You should be able to figure out from
there because the serenum source code in the WDK.
-Eliyas
- Posted by tfedricks@gmail.com on June 7th, 2007
Eliyas,
One good news is that i used the serenum sample in WDK and used that
driver as upper filter. The serenum enumerated the attached
device(serial mouse) and i got all the calls expected from the driver.
One other i would like to bring to notice is that the
IoRegisterDeviceInterface() of serenum also failed with error
0xC0000010, the same error which my serial driver failed.
I dont know what is the reason for failure. I assume that the call
WdfDeviceCreateDeviceInterface() in my serial driver has failed due to
failure in serenum.
Let me know your comments. Also, suggest me if im going wrong
anywhere.
Thank You.
Regards,
Tim
- Posted by tfedricks@gmail.com on June 7th, 2007
Thanks for the immediate reply. The enumerator for my device is not
ACPI, i have my own enumerator and it is Serport.
I could see the serenum being listed in HKEY_LOCAL_MACHINE\SYSTEM
\CurrentControlSet\Enum\Serport. Will this cause any problem.
Do i need to use ACPI as the enumerator for the device. Since my
device is virtual com i used Serport as enumerator.
I put the break point in AddDevice routine of serenum (WDK),
AddDevice() fails at IoRegisterDeviceInterface() with the same error.
Thank You.
Regards,
Tim
- Posted by Eliyas Yakub [MSFT] on June 7th, 2007
I mentioned ACPI because I thought you are dealing with system comport. If
it's being enumerated by your own serport then it's fine. Now the failure
of IoRegisterDeviceInterface really baffles me.
Did you use WDF to write a serport bus driver?
If you are not using WDF then when you created the PDO, did you clear the
DO_DEVICE_INITIALIZING flag in the deviceobject?
-Eliyas
<tfedricks@gmail.com> wrote in message
news:1181229474.346053.300310@p77g2000hsh.googlegr oups.com...
- Posted by tfedricks@gmail.com on June 7th, 2007
I have used WDF to write serport bus driver. I have used toaster bus
static sample to enumerate a new device.
Do i need to clear the if i still use WDF?
Regards,
Tim
- Posted by tfedricks@gmail.com on June 7th, 2007
I have used WDF toaster bus static sample to enumerate as a serial
device for sepor bus driver.
Do i still need to clear the flag DO_DEVICE_INITIALIZING if i use WDF?
Regards,
Tim
- Posted by Eliyas Yakub [MSFT] on June 7th, 2007
No you don't have to. I will take this offline with you.
-Eliyas
<tfedricks@gmail.com> wrote in message
news:1181240007.107804.239640@r19g2000prf.googlegr oups.com...