The IoOpenDeviceInterfaceRegistryKey routine returns a handle to a registry key for storing information about a particular device interface instance.
NTSTATUS
IoOpenDeviceInterfaceRegistryKey(
IN PUNICODE_STRING SymbolicLinkName,
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE DeviceInterfaceKey
);
IoOpenDeviceInterfaceRegistryKey returns STATUS_SUCCESS if the call was successful. Possible error return values include the following.
| Error Status | Description |
|---|---|
| STATUS_OBJECT_NAME_NOT_FOUND | The routine was not able to locate a registry key for the device interface instance, probably due to an error in the SymbolicLinkName. |
| STATUS_OBJECT_PATH_NOT_FOUND | The routine was not able to locate a registry key for the device interface instance, probably due to an error in the SymbolicLinkName. |
| STATUS_INVALID_PARAMETER | Possibly indicates an error in the SymbolicLinkName. |
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
IoOpenDeviceInterfaceRegistryKey opens a nonvolatile subkey of the registry key for the device interface instance specified by SymbolicLinkName. Drivers can store information in this subkey that is specific to this instance of the device interface, such as the default resolution for a camera. User-mode applications can access this subkey using SetupDiXxx routines.
The driver must call ZwClose to close the handle returned from this routine when access is no longer required.
Callers of IoOpenDeviceInterfaceRegistryKey must be running at IRQL = PASSIVE_LEVEL in the context of a system thread.
ACCESS_MASK, IoGetDeviceInterfaces, IoGetDeviceInterfaceAlias, IoRegisterDeviceInterface, ZwClose