Windows Dev Center

GetDevicesForIscsiSession function

The GetDevicesForIscsiSession function retrieves information about the devices associated with the current session.

Syntax


HRESULT WINAPI GetDevicesForIscsiSession(
  _In_    PISCSI_UNIQUE_SESSION_ID UniqueSessionId,
  _Inout_ ULONG                    *DeviceCount,
  _Out_   PISCSI_DEVICE_ON_SESSION Devices
);

Parameters

UniqueSessionId [in]

A pointer to a structure of type ISCSI_UNIQUE_SESSION_ID that contains the session identifier for the session.

DeviceCount [in, out]

A pointer to a location that, on input, contains the number of elements of type ISCSI_DEVICE_ON_SESSION that can fit in the buffer that Devices points to. If the operation succeeds, the location receives the number of elements retrieved. If GetDevicesForIscsiSession returns ERROR_INSUFFICIENT_BUFFER, the location still receives the number of elements the buffer is capable of containing.

Devices [out]

An array of ISCSI_DEVICE_ON_SESSION-type structures that, on output, receives information about each device associated with the session.

Return value

Returns ERROR_SUCCESS if the operation succeeds and ERROR_INSUFFICIENT_BUFFER if the caller allocated insufficient buffer space for the array in Devices.

Otherwise, GetDevicesForIscsiSession 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

GetDevicesForIscsiSessionW (Unicode) and GetDevicesForIscsiSessionA (ANSI)

See also

ISCSI_DEVICE_ON_SESSION
ISCSI_UNIQUE_SESSION_ID

 

 

Community Additions

ADD
Show:
© 2015 Microsoft