The UAC Setting influence the driver based on WDM and WDF

Hi all,

I have a serial port driver based on WDF and when i try to open the serial port with Hyper Terminal in Win7 32bit OS ,it pops up a dialog message “Another program is using the selected telephony device, Try again after the other program completes” . i am sure that i didn’t ever open the com port . and then i lower down the UAC setting, it runs correctly that the serial port can be open normal by Hyper Terminal.

For comparison , i higher up the UAC setting , and use the usbser.sys that created by MS as the serial port driver. it runs well with Hyper Terminal .

it looks like the usbser driver(WDM) might not be influenced by UAC setting ,and the serial driver that based on WDF would, the WDF serial driver require a administrator privilege.

Is the problem of the WDF ? or i should create the driver/device in my code that not ask the user has the administrator privilege , and how could i do that ? it seems nowhere to be setting .

I think you need to use proper security settings for your devices, see
http://www.osronline.com/article.cfm?article=508 or search for SDDL
and WdfDeviceInitAssignSDDLString.

Kris

Which bus driver enumerated the pdo for the serial port? Usbhub or your own custom kmdf bus driver?

d

debt from my phone

-----Original Message-----
From: xxxxx@hotmail.com
Sent: Tuesday, June 07, 2011 1:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] The UAC Setting influence the driver based on WDM and WDF

Hi all,

I have a serial port driver based on WDF and when i try to open the serial port with Hyper Terminal in Win7 32bit OS ,it pops up a dialog message “Another program is using the selected telephony device, Try again after the other program completes” . i am sure that i didn’t ever open the com port . and then i lower down the UAC setting, it runs correctly that the serial port can be open normal by Hyper Terminal.

For comparison , i higher up the UAC setting , and use the usbser.sys that created by MS as the serial port driver. it runs well with Hyper Terminal .

it looks like the usbser driver(WDM) might not be influenced by UAC setting ,and the serial driver that based on WDF would, the WDF serial driver require a administrator privilege.

Is the problem of the WDF ? or i should create the driver/device in my code that not ask the user has the administrator privilege , and how could i do that ? it seems nowhere to be setting .


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


Which bus driver enumerated the pdo for the serial port? Usbhub or your own
custom kmdf bus driver?

Not my own bus driver, but the MSFT’s USBHub.
i just developed the serial port driver.


I think you need to use proper security settings for your devices, see
http://www.osronline.com/article.cfm?article=508 or search for SDDL
and WdfDeviceInitAssignSDDLString.

UAC would be not the security feature , and i correct this sentence “the WDF serial driver require a
administrator privilege.” for i already have the administrator privilege .

and i try to avoid the UAC setting influence the application behavior to visit my driver based on WDF