IVdsServiceIscsi::RememberTargetSharedSecret method (vds.h)

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

Communicates the CHAP shared secret of a target to the initiator service. This shared secret is used during target login when the target authenticates the initiator.

Syntax

HRESULT RememberTargetSharedSecret(
  [in] VDS_OBJECT_ID           targetId,
  [in] VDS_ISCSI_SHARED_SECRET *pTargetSharedSecret
);

Parameters

[in] targetId

The VDS_OBJECT_ID of the target that has the specified shared secret. This parameter is required and cannot be GUID_NULL.

[in] pTargetSharedSecret

The address of a VDS_ISCSI_SHARED_SECRET structure that contains the CHAP shared secret.

Return value

This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.

Return code/value Description
S_OK
The shared secret was remembered successfully.
VDS_E_INITIALIZED_FAILED
0x80042401L
VDS failed to initialize. If an application calls this method before the service finishes initializing, the method is blocked until the initialization completes. If the initialization fails, this error is returned.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 R2 [desktop apps only]
Target Platform Windows
Header vds.h
Library Uuid.lib
Redistributable VDS 1.1

See also

IVdsIscsiTarget::RememberInitiatorSharedSecret

IVdsIscsiTarget::SetSharedSecret

IVdsServiceIscsi

IVdsServiceIscsi::SetInitiatorSharedSecret

VDS_ISCSI_SHARED_SECRET