// wdm.h
NTSTATUS IoGetContainerInformation(
[in] IO_CONTAINER_INFORMATION_CLASS InformationClass,
[in, optional] PVOID ContainerObject,
[in, out] PVOID Buffer,
[in] ULONG BufferLength
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoGetContainerInformation routine provides information about the current state of a user session.
InformationClass [in]Specifies the class of events for which the caller (driver) requests information. Set this parameter to the following IO_CONTAINER_INFORMATION_CLASS enumeration value:
For more information, see the following Remarks section.
ContainerObject [in, optional]A pointer to an opaque, system object supplied by the I/O manager. For InformationClass = IoSessionStateInformation, set this parameter to the SessionObject parameter value that is provided by the I/O manager during the call to the driver's IO_SESSION_NOTIFICATION_FUNCTION function.
Buffer [in, out]A pointer to a caller-allocated buffer into which this routine writes the state information for the event class specified by InformationClass. For InformationClass = IoSessionStateInformation, the routine writes an IO_SESSION_STATE_INFORMATION structure to the buffer. The buffer must be large enough to contain this structure.
BufferLength [in]The size, in bytes, of the buffer pointed to by Buffer. For InformationClass = IoSessionStateInformation, BufferLength must be at least sizeof(IO_SESSION_STATE_INFORMATION).
IoGetContainerInformation returns STATUS_SUCCESS if the call is successful. Possible error return values include the following:
| Return code | Description |
|---|---|
| STATUS_INVALID_PARAMETER_1 | Parameter InformationClass is not a valid IO_CONTAINER_INFORMATION_CLASS enumeration constant. |
| STATUS_INVALID_PARAMETER_2 | Parameter ContainerObject is NULL. |
| STATUS_INVALID_PARAMETER_4 | Parameter BufferLength is too small for the information class specified by InformationClass. |
This routine can potentially support queries for a variety of information classes. In Windows 7, this routine supports only queries for IoSessionStateInformation information, which is status information about user sessions.
IO_CONTAINER_INFORMATION_CLASS
IO_CONTAINER_NOTIFICATION_CLASS