? I am working on USB Mass Storage Class Driver using KMDF to replace the Microsoft?s native Mass storage driver. Started with the class specific request ? GETMAXLUN.
? I am calling the GETMAXLUN in EvtDevicePrepareHardware after reading the configuration descriptor.
? After GETMAXLUN I am creating the PDO and attaching it to the device stack in the same EvtDevicePrepareHardware for the obtained LUN and I am updating the new LUN PDO to the PNP manager in the EvtDeviceRelationsQuery function. In PDO creation I am assigning the IDs, device type, device characteristics etc?.which I obtained from the disk.sys.
? Now the problem I am facing is PNP Manager is not loading the File system driver (Disk.sys). Also I am not sure whether the steps I am following are correct. Please suggest me the procedure, as in where to create PDO and updating the same to pnp manager so that it loads Disk.sys file.
Please help me in this, its urgent.
*Why* are you replacing the inbox class driver? That’s completely unsupported as a general approach, is there a specific problem you are trying to address?
Try to avoid fixating on what you think is the only way to solve the problem, and tell us the problem you are trying to solve, and we might be able to offer a solution that is supportable.
Phil
Not speaking for LogRhythm, Inc.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.in
Sent: Wednesday, November 28, 2012 9:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
? I am working on USB Mass Storage Class Driver using KMDF to replace the Microsoft?s native Mass storage driver. Started with the class specific request ? GETMAXLUN.
? I am calling the GETMAXLUN in EvtDevicePrepareHardware after reading the configuration descriptor.
? After GETMAXLUN I am creating the PDO and attaching it to the device stack in the same EvtDevicePrepareHardware for the obtained LUN and I am updating the new LUN PDO to the PNP manager in the EvtDeviceRelationsQuery function. In PDO creation I am assigning the IDs, device type, device characteristics etc?.which I obtained from the disk.sys.
? Now the problem I am facing is PNP Manager is not loading the File system driver (Disk.sys). Also I am not sure whether the steps I am following are correct. Please suggest me the procedure, as in where to create PDO and updating the same to pnp manager so that it loads Disk.sys file.
Please help me in this, its urgent.
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
You don’t use EvtDeviceRelationsQuery to enumerate a pdo, rather you use static or dynamic child enumeration APIs
d
dent from pjone
From: xxxxx@live.inmailto:xxxxx
Sent: ?11/?28/?2012 8:54 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
? I am working on USB Mass Storage Class Driver using KMDF to replace the Microsoft?s native Mass storage driver. Started with the class specific request ? GETMAXLUN.
? I am calling the GETMAXLUN in EvtDevicePrepareHardware after reading the configuration descriptor.
? After GETMAXLUN I am creating the PDO and attaching it to the device stack in the same EvtDevicePrepareHardware for the obtained LUN and I am updating the new LUN PDO to the PNP manager in the EvtDeviceRelationsQuery function. In PDO creation I am assigning the IDs, device type, device characteristics etc?.which I obtained from the disk.sys.
? Now the problem I am facing is PNP Manager is not loading the File system driver (Disk.sys). Also I am not sure whether the steps I am following are correct. Please suggest me the procedure, as in where to create PDO and updating the same to pnp manager so that it loads Disk.sys file.
Please help me in this, its urgent.
—
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</mailto:xxxxx></mailto:xxxxx>
@Phil Barila:
I need to create PDO for LUN and update about it to the PNP manager so that it loads disk.sys.
I am able to create PDO and attach to the device stack successfully. For updating it to pnp I am calling the following APIs in EvtDeviceRelationsQuery :
WdfFdoGetDefaultChildList
WdfChildListBeginScan
WdfChildListUpdateAllChildDescriptionsAsPresent
WdfChildListEndScan
Problem I am facing is:
While debugging I am getting handle to a specified device’s default child list as NULL, when the function WdfFdoGetDefaultChildList is called so not able to proceed with further functions (getting blue screen error). And disk.sys file is not loading.
Let me know if the procedure I am following is correct, if not give suggestion how to go about it.
its urgent
Did you call WdfFdoInitSetDefaultChildListConfig first? This is clearly called out in the docs for WdfFdoGetDefaultChildList. Don’t do what you are doing in EvtDeviceRelationsQuery. Instead, just report a child as present as soon as you have the relevant info
d
dent from pjone
From: xxxxx@live.inmailto:xxxxx
Sent: ?11/?28/?2012 9:03 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
@Phil Barila:
I need to create PDO for LUN and update about it to the PNP manager so that it loads disk.sys.
I am able to create PDO and attach to the device stack successfully. For updating it to pnp I am calling the following APIs in EvtDeviceRelationsQuery :
WdfFdoGetDefaultChildList
WdfChildListBeginScan
WdfChildListUpdateAllChildDescriptionsAsPresent
WdfChildListEndScan
Problem I am facing is:
While debugging I am getting handle to a specified device’s default child list as NULL, when the function WdfFdoGetDefaultChildList is called so not able to proceed with further functions (getting blue screen error). And disk.sys file is not loading.
Let me know if the procedure I am following is correct, if not give suggestion how to go about it.
its urgent
—
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</mailto:xxxxx></mailto:xxxxx>
Doron,
You did notice that the OP said, “I am working on USB Mass Storage Class Driver using KMDF to replace the Microsoft?s native Mass storage driver.” Do you really want to continue to help him off that cliff? Or have you all in the MotherShip decided to relax your stance about the complete (non)support of replacing in-box drivers?
To the OP, you’ve stated your problem in terms of “I need to attach the cantilevers from the underside of the wings to the flanks of the pig”. See (http://www.osronline.com/downloads/pp_asking.pdf) for more context about that.
Back to my first question, what problem do you think you are solving by replacing “the Microsoft’s native Mass storage driver”? I’m not asking what problems are you having in implementing it, I’m asking what problem do you intend to solve by implementing that? Because I’m pretty sure there is a better way to solve that problem than the way you are attempting.
Phil
Phil Barila | Senior Software Engineer
720.881.5364 (w)
LogRhythm, Inc.
A LEADER 2012 SIEM Magic Quadrant
WINNER of SC Magazine?s 2012 SIEM Best Buy
From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Doron Holan [xxxxx@microsoft.com]
Sent: Wednesday, November 28, 2012 10:10 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Did you call WdfFdoInitSetDefaultChildListConfig first? This is clearly called out in the docs for WdfFdoGetDefaultChildList. Don’t do what you are doing in EvtDeviceRelationsQuery. Instead, just report a child as present as soon as you have the relevant info
d
dent from pjone
From: xxxxx@live.inmailto:xxxxx
Sent: ?11/?28/?2012 9:03 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
@Phil Barila:
I need to create PDO for LUN and update about it to the PNP manager so that it loads disk.sys.
I am able to create PDO and attach to the device stack successfully. For updating it to pnp I am calling the following APIs in EvtDeviceRelationsQuery :
WdfFdoGetDefaultChildList
WdfChildListBeginScan
WdfChildListUpdateAllChildDescriptionsAsPresent
WdfChildListEndScan
Problem I am facing is:
While debugging I am getting handle to a specified device’s default child list as NULL, when the function WdfFdoGetDefaultChildList is called so not able to proceed with further functions (getting blue screen error). And disk.sys file is not loading.
Let me know if the procedure I am following is correct, if not give suggestion how to go about it.
its urgent
—
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
—
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</mailto:xxxxx></mailto:xxxxx>
Phill,
it?s a learning exercise ? to get to know an implementation of KMDF driver ?not exactly replacing the inbox driver.
OK, that makes sense. Although, you could have started with a much simpler “learning exercise”.
Phil
Not speaking for LogRhythm
Phil Barila | Senior Software Engineer
720.881.5364 (w)
LogRhythm, Inc.
A LEADER 2012 SIEM Magic Quadrant
WINNER of SC Magazine?s 2012 SIEM Best Buy
From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of xxxxx@live.in [xxxxx@live.in]
Sent: Wednesday, November 28, 2012 10:52 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Phill,
it?s a learning exercise ? to get to know an implementation of KMDF driver ?not exactly replacing the inbox driver.
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
Phill,
ok. sorry, for confusing with the words.
please tell me,how the above mentioned problem can be resolved? if the procedure is right or where i am going wrong.
I am not endorsing the replacement of an inbox driver. I am just making sure that for the record when someone else rewds this thread and wants to enumerate a pdo, they see that his described way is incorrect
d
dent from pjone
From: Phil Barilamailto:xxxxx
Sent: ?11/?28/?2012 9:48 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Doron,
You did notice that the OP said, “I am working on USB Mass Storage Class Driver using KMDF to replace the Microsoft?s native Mass storage driver.” Do you really want to continue to help him off that cliff? Or have you all in the MotherShip decided to relax your stance about the complete (non)support of replacing in-box drivers?
To the OP, you’ve stated your problem in terms of “I need to attach the cantilevers from the underside of the wings to the flanks of the pig”. See (http://www.osronline.com/downloads/pp_asking.pdf) for more context about that.
Back to my first question, what problem do you think you are solving by replacing “the Microsoft’s native Mass storage driver”? I’m not asking what problems are you having in implementing it, I’m asking what problem do you intend to solve by implementing that? Because I’m pretty sure there is a better way to solve that problem than the way you are attempting.
Phil
Phil Barila | Senior Software Engineer
720.881.5364 (w)
LogRhythm, Inc.
A LEADER 2012 SIEM Magic Quadrant
WINNER of SC Magazine?s 2012 SIEM Best Buy
From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Doron Holan [xxxxx@microsoft.com]
Sent: Wednesday, November 28, 2012 10:10 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Did you call WdfFdoInitSetDefaultChildListConfig first? This is clearly called out in the docs for WdfFdoGetDefaultChildList. Don’t do what you are doing in EvtDeviceRelationsQuery. Instead, just report a child as present as soon as you have the relevant info
d
dent from pjone
From: xxxxx@live.inmailto:xxxxx
Sent: ?11/?28/?2012 9:03 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
@Phil Barila:
I need to create PDO for LUN and update about it to the PNP manager so that it loads disk.sys.
I am able to create PDO and attach to the device stack successfully. For updating it to pnp I am calling the following APIs in EvtDeviceRelationsQuery :
WdfFdoGetDefaultChildList
WdfChildListBeginScan
WdfChildListUpdateAllChildDescriptionsAsPresent
WdfChildListEndScan
Problem I am facing is:
While debugging I am getting handle to a specified device’s default child list as NULL, when the function WdfFdoGetDefaultChildList is called so not able to proceed with further functions (getting blue screen error). And disk.sys file is not loading.
Let me know if the procedure I am following is correct, if not give suggestion how to go about it.
its urgent
—
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
—
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
—
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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>
I’m a storage stack expert, not a KMDF expert. I just didn’t want you thinking it’s a viable idea to replace a part of the storage stack with your own version of it outside of a lab environment.
Phil
Not speaking for LogRhythm
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.in
Sent: Wednesday, November 28, 2012 11:16 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Phill,
ok. sorry, for confusing with the words.
please tell me,how the above mentioned problem can be resolved? if the procedure is right or where i am going wrong.
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
@ Doron,
I am creating PDO and attaching it to the stack in EvtDevicePrepareHardware function after GETMAXLUN. For PDO creation I am giving the IDs (Hardware ID, Device ID, Compatible ID, Device Characteristics,Type etc?.) which I got from disk.sys.
For attaching pdo I am using WdfFdoAddStaticChild.
All the functions which I am calling are success. But the disk.sys is is not getting loaded.
Please suggest me if I am wrong or whether I am missing any steps. Why pnp manager is not able to load disk.sys file?
Look at setupapi.dev.log to see why the device isn’t being installed. I am guessing you are not reporting gendisk as one of the IDs
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@live.in
Sent: Thursday, November 29, 2012 8:58 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
@ Doron,
I am creating PDO and attaching it to the stack in EvtDevicePrepareHardware function after GETMAXLUN. For PDO creation I am giving the IDs (Hardware ID, Device ID, Compatible ID, Device Characteristics,Type etc?.) which I got from disk.sys.
For attaching pdo I am using WdfFdoAddStaticChild.
All the functions which I am calling are success. But the disk.sys is is not getting loaded.
Please suggest me if I am wrong or whether I am missing any steps. Why pnp manager is not able to load disk.sys file?
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
Doron,
In device ID I have mentoined as a gendisk and reporting it through the function
WdfPdoInitAssignDeviceID.
Device id is not a compat or HW id used to match an inf
d
dent from pjone
From: xxxxx@live.inmailto:xxxxx
Sent: ?11/?30/?2012 1:52 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Issue in creating PDO and loading Disk.sys in USB mass storage class driver
Doron,
In device ID I have mentoined as a gendisk and reporting it through the function
WdfPdoInitAssignDeviceID.
—
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</mailto:xxxxx></mailto:xxxxx>
shriresh pillai wrote:
it?s a learning exercise ? to get to know an implementation
of KMDF driver ?not exactly replacing the inbox driver.
Then why did you say “Please help me in this, its urgent.” in your original message? Learning exercises generally aren’t “urgent”.
I think you’re full of it and this is some quasi-malware product that is going to spam me with Autorun drive letters.
And I’m pretty experienced at teaching people how to write drivers: OP… What you have chosen is not a good learning exercise. It is a bad learning exercise.
As Mr. Aseltine pointed out, you’re not being consistent. I agree with his assessment that you’re not being truthful about why you’re asking these questions. I don’t care for that.
Do not expect any additional help from this list.
Peter
OSR