Export (0) Print
Expand All
Expand Minimize

IoOpenDeviceInterfaceRegistryKey routine

The IoOpenDeviceInterfaceRegistryKey routine returns a handle to a registry key for storing information about a particular device interface instance.

Syntax


NTSTATUS IoOpenDeviceInterfaceRegistryKey(
  _In_   PUNICODE_STRING SymbolicLinkName,
  _In_   ACCESS_MASK DesiredAccess,
  _Out_  PHANDLE DeviceInterfaceKey
);

Parameters

SymbolicLinkName [in]

Pointer to a string identifying the device interface instance. This string was obtained from a previous call to IoGetDeviceInterfaces, IoGetDeviceInterfaceAlias, or IoRegisterDeviceInterface.

DesiredAccess [in]

Specifies the ACCESS_MASK value that represents the access the caller requires to the key, such as KEY_READ, KEY_WRITE, or KEY_ALL_ACCESS. See ZwCreateKey for a description of each KEY_XXX access right.

DeviceInterfaceKey [out]

Pointer to a returned handle to the requested registry key if the call is successful.

Return value

IoOpenDeviceInterfaceRegistryKey returns STATUS_SUCCESS if the call was successful. Possible error return values include the following.

Return codeDescription
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.

 

Remarks

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.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL (see Remarks section)

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

ACCESS_MASK
IoGetDeviceInterfaces
IoGetDeviceInterfaceAlias
IoRegisterDeviceInterface
ZwClose

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft