Skip to content

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