UMDF Questions

I have three quick questions about UMDF:

  1. IWDFDevice::CreateSymbolicLink, what is the format of the argument pSymbolicLink? \.\Name ? \??\Name ? \DosDevices\Name The documentation(http://msdn2.microsoft.com/en-us/library/aa939055.aspx) doesn’t really say what it is.

  2. Under what circumstances will UMDF just flat out terminate the host process. My IDriverEntry::Initialize and IDriverEntry::AddDevice both return S_OK indicating success. However I never get the expected callback in IPnpCallbackHardware::OnPrepareHardware for the interface I passed into IWDFDriver::CreateDevice. After running the AddDevice callback, the host process just out and terminates.

  3. Why does the ConfigureRequestDispatching call always return the hresult indicating invalid parameter (0x80070057):
    hr=pWdfDevice->CreateIoQueue(pUnk, TRUE, WdfIoQueueDispatchSequential, TRUE, TRUE, &pWdfIoQueue);

    hr=pWdfDevice->ConfigureRequestDispatching(pWdfIoQueue, WdfRequestDeviceIoControl, TRUE);
    Which parameter is invalid. I can’t figure it out, I copied it right out of the sample.

Thank Y’all for yer help.
Asa

Just a guess here, I don’t have the src in front of me. You are
creating a default i/o queue (the 2nd parameter, the first TRUE, you are
appsing to CreateIoQueue). A default queue cannot be used configured
for dispatching b/c it will get all i/o types that you do not explicitly
configure for dispatching.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Asa Yeamans
Sent: Saturday, June 02, 2007 1:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF Questions

I have three quick questions about UMDF:

  1. IWDFDevice::CreateSymbolicLink, what is the format of the argument
    pSymbolicLink? \.\Name ? \??\Name ? \DosDevices\Name The
    documentation(http://msdn2.microsoft.com/en-us/library/aa939055.aspx)
    doesn’t really say what it is.

  2. Under what circumstances will UMDF just flat out terminate the host
    process. My IDriverEntry::Initialize and IDriverEntry::AddDevice both
    return S_OK indicating success. However I never get the expected
    callback in IPnpCallbackHardware::OnPrepareHardware for the interface I
    passed into IWDFDriver::CreateDevice. After running the AddDevice
    callback, the host process just out and terminates.

  3. Why does the ConfigureRequestDispatching call always return the
    hresult indicating invalid parameter (0x80070057):
    hr=pWdfDevice->CreateIoQueue(pUnk, TRUE,
    WdfIoQueueDispatchSequential, TRUE, TRUE, &pWdfIoQueue);

    hr=pWdfDevice->ConfigureRequestDispatching(pWdfIoQueue,
    WdfRequestDeviceIoControl, TRUE);
    Which parameter is invalid. I can’t figure it out, I copied it right out
    of the sample.

Thank Y’all for yer help.
Asa


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Wow, that wonderful tidbit of knowledge proved to solve issues 2 and 3. Apparanlty issue 3 was causing issue 2 for somereason. Well its staying loaded now and I can work with it. Thank you doron, as for the CreateSymbolicLink, any word from anyone on what the format of that string argument is?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Saturday, June 02, 2007 10:19 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF Questions

Just a guess here, I don’t have the src in front of me. You are creating a default i/o queue (the 2nd parameter, the first TRUE, you are appsing to CreateIoQueue). A default queue cannot be used configured for dispatching b/c it will get all i/o types that you do not explicitly configure for dispatching.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Asa Yeamans
Sent: Saturday, June 02, 2007 1:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF Questions

I have three quick questions about UMDF:

  1. IWDFDevice::CreateSymbolicLink, what is the format of the argument pSymbolicLink? \.\Name ? \??\Name ? \DosDevices\Name The
    documentation(http://msdn2.microsoft.com/en-us/library/aa939055.aspx)
    doesn’t really say what it is.

  2. Under what circumstances will UMDF just flat out terminate the host process. My IDriverEntry::Initialize and IDriverEntry::AddDevice both return S_OK indicating success. However I never get the expected callback in IPnpCallbackHardware::OnPrepareHardware for the interface I passed into IWDFDriver::CreateDevice. After running the AddDevice callback, the host process just out and terminates.

  3. Why does the ConfigureRequestDispatching call always return the hresult indicating invalid parameter (0x80070057):
    hr=pWdfDevice->CreateIoQueue(pUnk, TRUE, WdfIoQueueDispatchSequential, TRUE, TRUE, &pWdfIoQueue);

    hr=pWdfDevice->ConfigureRequestDispatching(pWdfIoQueue,
    WdfRequestDeviceIoControl, TRUE);
    Which parameter is invalid. I can’t figure it out, I copied it right out of the sample.

Thank Y’all for yer help.
Asa


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

1 - see IoCreateSymbolicLink() - UMDF passes the string you give it to that DDI.

2 - you should be able to look in c:\windows\system32\logfiles\wudf and see any .dmp files from UMDF terminating your host unexpectedly. However if you’re not seeing the callback and the host is exiting perhaps the driver below you in the stack (say the kernel-mode driver you’re loading on) isn’t successfully starting. You might watch the PNP IRPs sent to that driver and see if they are completed successfully.

3 - I don’t know offhand. Does pUnk support the device control callback interface?

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Asa Yeamans
Sent: Saturday, June 02, 2007 1:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF Questions

I have three quick questions about UMDF:

  1. IWDFDevice::CreateSymbolicLink, what is the format of the argument pSymbolicLink? \.\Name ? \??\Name ? \DosDevices\Name The documentation(http://msdn2.microsoft.com/en-us/library/aa939055.aspx) doesn’t really say what it is.

  2. Under what circumstances will UMDF just flat out terminate the host process. My IDriverEntry::Initialize and IDriverEntry::AddDevice both return S_OK indicating success. However I never get the expected callback in IPnpCallbackHardware::OnPrepareHardware for the interface I passed into IWDFDriver::CreateDevice. After running the AddDevice callback, the host process just out and terminates.

  3. Why does the ConfigureRequestDispatching call always return the hresult indicating invalid parameter (0x80070057):
    hr=pWdfDevice->CreateIoQueue(pUnk, TRUE, WdfIoQueueDispatchSequential, TRUE, TRUE, &pWdfIoQueue);

    hr=pWdfDevice->ConfigureRequestDispatching(pWdfIoQueue, WdfRequestDeviceIoControl, TRUE);
    Which parameter is invalid. I can’t figure it out, I copied it right out of the sample.

Thank Y’all for yer help.
Asa


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Ok cool, thanks, ill look up the IoCreateSymbolicLink and see where it takes me.
As for #2, turns out that if you return an error from AddDevice it unloads you… *go fig*… (I commented out the wrong return and as such it returned failure :slight_smile: )
And for #3, it was because I was operating on the default queue and well, you cant configure dispatching on the default queue. (Might want to put that in the docs @ http://msdn2.microsoft.com/en-us/library/aa511353.aspx)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Saturday, June 02, 2007 7:14 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] UMDF Questions

1 - see IoCreateSymbolicLink() - UMDF passes the string you give it to that DDI.

2 - you should be able to look in c:\windows\system32\logfiles\wudf and see any .dmp files from UMDF terminating your host unexpectedly. However if you’re not seeing the callback and the host is exiting perhaps the driver below you in the stack (say the kernel-mode driver you’re loading on) isn’t successfully starting. You might watch the PNP IRPs sent to that driver and see if they are completed successfully.

3 - I don’t know offhand. Does pUnk support the device control callback interface?

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Asa Yeamans
Sent: Saturday, June 02, 2007 1:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF Questions

I have three quick questions about UMDF:

  1. IWDFDevice::CreateSymbolicLink, what is the format of the argument pSymbolicLink? \.\Name ? \??\Name ? \DosDevices\Name The documentation(http://msdn2.microsoft.com/en-us/library/aa939055.aspx) doesn’t really say what it is.

  2. Under what circumstances will UMDF just flat out terminate the host process. My IDriverEntry::Initialize and IDriverEntry::AddDevice both return S_OK indicating success. However I never get the expected callback in IPnpCallbackHardware::OnPrepareHardware for the interface I passed into IWDFDriver::CreateDevice. After running the AddDevice callback, the host process just out and terminates.

  3. Why does the ConfigureRequestDispatching call always return the hresult indicating invalid parameter (0x80070057):
    hr=pWdfDevice->CreateIoQueue(pUnk, TRUE, WdfIoQueueDispatchSequential, TRUE, TRUE, &pWdfIoQueue);

    hr=pWdfDevice->ConfigureRequestDispatching(pWdfIoQueue, WdfRequestDeviceIoControl, TRUE); Which parameter is invalid. I can’t figure it out, I copied it right out of the sample.

Thank Y’all for yer help.
Asa


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer