How to use ACL to change the access of usb device
-
Hi I am using VC++ and i want to change the access of usb device form read and write to read only. i have understood that ACL can do that. i would like to know more information about how do we use ACL in vc++ to change the access of usb device thanks Anil Veeraghattapu.
-
Hi I am using VC++ and i want to change the access of usb device form read and write to read only. i have understood that ACL can do that. i would like to know more information about how do we use ACL in vc++ to change the access of usb device thanks Anil Veeraghattapu.
-
you can change access of usb device through registry. Registry path [code] LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\StorageDevicePolicies" [/code] just you change the values [code] "0" to "1" WriteProtect="1" [/code]
I dont want to change it from the registry i want to do it from the vc++ code by using win32 api i have understood that for usb device driver objects ACL if we added the ACE, then we can change it. but i would like to know which api should i use to achieve this
-
I dont want to change it from the registry i want to do it from the vc++ code by using win32 api i have understood that for usb device driver objects ACL if we added the ACE, then we can change it. but i would like to know which api should i use to achieve this
Anil709 wrote:
I dont want to change it from the registry i want to do it from the vc++ code
Are you of the thinking that code cannot be used to manipulate the registry?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Anil709 wrote:
I dont want to change it from the registry i want to do it from the vc++ code
Are you of the thinking that code cannot be used to manipulate the registry?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
i dont want to do anything with the registry all i want to do is to use win 32 api and to get the handle of the device and apply acl to it if you know how to apply ACL on the usb device please help me thanks Anil Veeraghattapu.
-
i dont want to do anything with the registry all i want to do is to use win 32 api and to get the handle of the device and apply acl to it if you know how to apply ACL on the usb device please help me thanks Anil Veeraghattapu.
The following links should help: Modifying the ACLs of an Object in C++[^] Creating a DACL[^] SetNamedSecurityInfo Function[^] SetSecurityInfo Function[^] Best Wishes, -David Delaune