Expand Minimize

IoWMIQueryAllDataMultiple routine

The IoWMIQueryAllDataMultiple routine returns all WMI data blocks that implement one of a set of WMI classes.

Syntax


NTSTATUS IoWMIQueryAllDataMultiple(
  _In_      PVOID *DataBlockObjectList,
  _In_      ULONG ObjectCount,
  _Inout_   ULONG *InOutBufferSize,
  _Out_opt_ PVOID OutBuffer
);

Parameters

DataBlockObjectList [in]

Pointer to an array of pointers to WMI data block objects. The caller opens a data block object for each WMI class with the IoWMIOpenBlock routine. Each object must be opened with the WMIGUID_QUERY access right.

ObjectCount [in]

Specifies the number of entries in the array passed in the DataBlockObjectList parameter.

InOutBufferSize [in, out]

Pointer to a memory location that specifies the size of the buffer passed in the OutBuffer parameter. If the routine succeeds, it updates the memory location to specify the number of bytes actually stored in OutBuffer. If the routine fails with status code of STATUS_BUFFER_TOO_SMALL, it returns the number of bytes required to return the data.

OutBuffer [out, optional]

Pointer to the buffer where the routine returns the WMI data. The routine returns a sequence of variable-sized WNODE_ALL_DATA structures, one for each set of returned data blocks. The WnodeHeader.Linkage member of each WNODE_ALL_DATA structure contains the offset from the beginning of the current WNODE_ALL_DATA to the beginning of the next WNODE_ALL_DATA. The final block in the chain has WnodeHeader.Linkage set to zero. OutBuffer must point to a buffer allocated from nonpaged pool.

Return value

The routine returns an NTSTATUS code. Possible return values include:

Return codeDescription
STATUS_SUCCESS

The operation succeeded. The routine returns the WMI data in the buffer pointed to by the OutBuffer parameter. The routine also returns the size, in bytes, of the returned data in the memory location pointed to by the InOutBufferSize parameter.

STATUS_BUFFER_TOO_SMALL

The buffer passed by the caller in the OutBuffer parameter is too small. The routine returns the required buffer size in the memory location pointed to by the InOutBufferSize parameter.

 

Remarks

IoWMIQueryAllDataMultiple determines which drivers support the specified WMI classes, and issues an IRP_MN_QUERY_ALL_DATA request to every such driver.

If no drivers implement any of the specified WMI classes, the routine returns STATUS_SUCCESS It also returns a value of zero in the memory location pointed to by the InOutBufferSize parameter.

To query a single WMI class, use IoWMIQueryAllData.

Requirements

Target platform

Universal

Version

Available in Windows XP and later versions of the Windows operating system.

Header

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

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

See also

IoWMIOpenBlock
IoWMIQueryAllData
IRP_MN_QUERY_ALL_DATA

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft