ReportIScsiTargetsA function (iscsidsc.h)

The ReportIscsiTargets function retrieves the list of targets that the iSCSI initiator service has discovered, and can also instruct the iSCSI initiator service to refresh the list.

Syntax

ISDSC_STATUS ISDSC_API ReportIScsiTargetsA(
  [in]      BOOLEAN ForceUpdate,
  [in, out] PULONG  BufferSize,
  [out]     PCHAR   Buffer
);

Parameters

[in] ForceUpdate

If true, the iSCSI initiator service updates the list of discovered targets before returning the target list data to the caller.

[in, out] BufferSize

A ULONG value that specifies the number of list elements contained by the Buffer parameter.

[out] Buffer

Pointer to a buffer that receives and contains the list of targets. The list consists of null-terminated strings. The last string, however, is double null-terminated.

Return value

Returns ERROR_SUCCESS if the operation succeeds and ERROR_INSUFFICIENT_BUFFER if the buffer size is insufficient to contain the output data. Otherwise, ReportIscsiTargets returns the appropriate Win32 or iSCSI error code on failure.

Remarks

Note

The iscsidsc.h header defines ReportIScsiTargets 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

ReportIscsiSendTargetPortals