RemoveIScsiPersistentTargetW function (iscsidsc.h)

The RemoveIscsiPersistentTarget function removes a persistent login for the specified hardware initiator Host Bus Adapter (HBA), initiator port, and target portal.

Syntax

ISDSC_STATUS ISDSC_API RemoveIScsiPersistentTargetW(
  [in]           PWSTR                 InitiatorInstance,
  [in, optional] ULONG                 InitiatorPortNumber,
  [in]           PWSTR                 TargetName,
  [in]           PISCSI_TARGET_PORTALW Portal
);

Parameters

[in] InitiatorInstance

The name of the initiator that maintains the persistent login to remove.

[in, optional] InitiatorPortNumber

The port number on which the initiator connects to TargetName. If InitiatorPortNumber is ISCSI_ALL_INITIATOR_PORTS the miniport driver for the initiator HBA removes the TargetName from the persistent login lists for all initiator ports.

[in] TargetName

The name of the target.

[in] Portal

The portal through which the initiator connects to the target. If Portal is null or contains no information, the miniport driver for the initiator HBA removes persistent logins for the target on all portals.

Return value

Returns ERROR_SUCCESS if the operation succeeds. Otherwise, it returns the appropriate Win32 or iSCSI error code.

Remarks

Note

The iscsidsc.h header defines RemoveIScsiPersistentTarget as an alias which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
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

AddPersistentIscsiDevice

ClearPersistentIscsiDevices

RemovePersistentIscsiDevice

ReportIscsiPersistentLogins

ReportPersistentIscsiDevices

SetupPersistentIscsiDevices