Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace IoCreateDevice to IoCreateDeviceSecure. #1203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

riwaida
Copy link

@riwaida riwaida commented Aug 6, 2024

Replace IoCreateDevice to IoCreateDeviceSecure.

Documentation of IoCreateDevice mentions as follows. This sample is creating a named device object, and it is not specified security descriptor in the INF file. Thus, it should use IoCreateDeviceSecure instead of IoCreateDevice.

IoCreateDevice function (wdm.h)

IoCreateDevice can only be used to create an unnamed device object, or a named device object for which a security descriptor is set by an INF file. Otherwise, drivers must use IoCreateDeviceSecure to create named device objects.

Replace IoCreateDevice to IoCreateDeviceSecure. Documentation of IoCreateDevice mentions as follows. This sample is creating a named device object, and it is not specified security descriptor in the INF file. Thus, it should use IoCreateDeviceSecure.
---------------------------
IoCreateDevice can only be used to create an unnamed device object, or a named device object for which a security descriptor is set by an INF file. Otherwise, drivers must use IoCreateDeviceSecure to create named device objects. 
---------------------------
@riwaida riwaida requested a review from a team as a code owner August 6, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants