ReportIScsiTargetPortalsA function (iscsidsc.h)

The ReportIscsiTargetPortals function retrieves target portal information discovered by the iSCSI initiator service.

Syntax

ISDSC_STATUS ISDSC_API ReportIScsiTargetPortalsA(
  [in, optional] PSTR                  InitiatorName,
  [in]           PSTR                  TargetName,
  [in, optional] PUSHORT               TargetPortalTag,
  [in, out]      PULONG                ElementCount,
  [out]          PISCSI_TARGET_PORTALA Portals
);

Parameters

[in, optional] InitiatorName

A string that represents the name of the initiator node.

[in] TargetName

A string that represents the name of the target for which the portal information is retrieved.

[in, optional] TargetPortalTag

A USHORT value that represents a tag associated with the portal.

[in, out] ElementCount

A ULONG value that specifies the number of portals currently reported for the specified target.

[out] Portals

A variable-length array of an ISCSI_TARGET_PORTALW structure. The number of elements contained in this array is specified by the value of ElementCount.

Return value

Returns ERROR_SUCCESS if the operation is successful. If the operation fails due to a socket connection error, this function will return a Winsock error code.

Remarks

Note

The iscsidsc.h header defines ReportIScsiTargetPortals as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header iscsidsc.h
Library Iscsidsc.lib
DLL Iscsidsc.dll

See also

ISCSI_TARGET_PORTALW