GetIscsiSessionList function

The GetIscsiSessionList function retrieves the list of active iSCSI sessions.

Syntax


HRESULT WINAPI GetIscsiSessionList(
  _Inout_ ULONG               *BufferSize,
  _Out_   ULONG               *SessionCount,
  _Out_   PISCSI_SESSION_INFO SessionInfo
);

Parameters

BufferSize [in, out]

A pointer to a location that, on input, contains the size, in bytes, of the caller-allocated buffer that SessionInfo points to. If the operation succeeds, the location receives the size, in bytes, of the session information data that was retrieved.

If the operation fails because the output buffer size was insufficient, the location receives the size, in bytes, of the buffer size required to contain the output data.

SessionCount [out]

A pointer to a location that, on input, contains the number of ISCSI_SESSION_INFO structures that the buffer that SessionInfo points to can contain. If the operation succeeds, the location receives the number of ISCSI_SESSION_INFO structures that were retrieved.

SessionInfo [out]

A pointer to a buffer that contains a series of contiguous structures of type ISCSI_SESSION_INFO that describe the active login sessions.

Return value

Returns ERROR_SUCCESS if the operation succeeds and ERROR_INSUFFICIENT_BUFFER if the size of the buffer at SessionInfo was insufficient to hold the output data.

Otherwise, GetIscsiSessionList returns the appropriate Win32 or iSCSI error code on failure.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Iscsidsc.h

Library

Iscsidsc.lib

DLL

Iscsidsc.dll

Unicode and ANSI names

GetIscsiSessionListW (Unicode) and GetIscsiSessionListA (ANSI)

See also

ISCSI_SESSION_INFO

 

 

Community Additions

ADD
Show: