Export (0) Print
Expand All
Expand Minimize

IoGetDevicePropertyData routine

The IoGetDevicePropertyData routine retrieves the current setting for a device property.

Syntax


NTSTATUS IoGetDevicePropertyData(
  _In_        PDEVICE_OBJECT Pdo,
  _In_        const DEVPROPKEY *PropertyKey,
  _In_        LCID Lcid,
  _Reserved_  ULONG Flags,
  _In_        ULONG Size,
  _Out_       PVOID Data,
  _Out_       PULONG RequiredSize,
  _Out_       PDEVPROPTYPE Type
);

Parameters

Pdo [in]

A pointer to the physical device object (PDO) for the device that is being queried.

PropertyKey [in]

A pointer to a DEVPROPKEY structure that specifies the device property key.

Lcid [in]

A locale identifier. Set this parameter either to a language-specific LCID value or to LOCALE_NEUTRAL. The LOCALE_NEUTRAL LCID specifies that the property is language-neutral (that is, not specific to any language). Do not set this parameter to LOCALE_SYSTEM_DEFAULT or LOCALE_USER_DEFAULT. For more information about language-specific LCID values, see LCID Structure.

Flags

Reserved for system use. Drivers should set this value to 0.

Size [in]

The size, in bytes, of the buffer that Data points to.

Data [out]

A pointer to the device property data.

RequiredSize [out]

A pointer to a ULONG to receive the size of the property information that is returned at Data. If IoGetDevicePropertyData returns STATUS_BUFFER_TOO_SMALL, the caller can use this value to allocate a buffer of the correct size.

Type [out]

A pointer to a DEVPROPTYPE value. If IoGetDevicePropertyData completes successfully, the routine uses Type to supply the type of data that is returned in the Data buffer.

Return value

IoGetDevicePropertyData returns an NTSTATUS value. This routine might return one of the following values:

Return codeDescription
STATUS_SUCCESS

The operation succeeded. The Data buffer contains the retrieved data. *Type contains the type of the retrieved data.

STATUS_BUFFER_TOO_SMALL

The Data buffer is too small. *RequiredSize contains the required buffer length.

STATUS_OBJECT_NAME_NOT_FOUND

The specified device property was not found.

 

Remarks

Kernel-mode drivers use the IoGetDevicePropertyData routine to retrieve device properties that are defined as part of the unified device property model. For more information about device properties, see Device Properties.

Drivers can use the IoSetDevicePropertyData routine to modify a device property.

Callers of IoGetDevicePropertyData must be running at IRQL <= APC_LEVEL in the context of a system thread.

Requirements

Version

Available starting with Windows Vista.

Header

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

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

DEVPROPKEY
DEVPROPTYPE
IoSetDevicePropertyData

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft