IVssHardwareSnapshotProvider::LocateLuns method (vsprov.h)

The LocateLuns method prompts the hardware provider to make the shadow copy LUNs visible to the computer. The LocateLuns method is called by VSS when a hardware shadow copy set is imported to a computer. The provider is responsible for any unmasking (or "surfacing") at the hardware level.

Note  Hardware providers are only supported on Windows Server operating systems.
 

Syntax

HRESULT LocateLuns(
  [in] LONG                lLunCount,
  [in] VDS_LUN_INFORMATION *rgSourceLuns
);

Parameters

[in] lLunCount

Number of LUNs that contribute to this shadow copy set.

[in] rgSourceLuns

Pointer to an array of iLunCountVDS_LUN_INFORMATION structures, one for each LUN that is part of the shadow copy set to be imported.

Return value

This method can return one of these values.

Return code/value Description
S_OK
0x00000000L
The operation was successfully completed.
E_OUTOFMEMORY
0x8007000EL
Out of memory or other system resources.
E_INVALIDARG
0x80070057L
One of the parameter values is not valid.
VSS_E_PROVIDER_VETO
0x80042306L
An unexpected provider error occurred. The provider must report an event in the application event log providing the user with information on how to resolve the problem.

Remarks

In the rgSourceLuns parameter, VSS supplies the same array of VDS_LUN_INFORMATION structures that the provider previously initialized in its IVssHardwareSnapshotProvider::GetTargetLuns method. For each VDS_LUN_INFORMATION structure in the array, the provider should unmask (or "surface") the corresponding shadow copy LUN to the computer.

Immediately after this method returns, VSS will perform a rescan and enumeration to detect any arrived devices. This causes any exposed LUNs to be discovered by the PnP manager. In parallel with listening for disk arrivals, VSS will also listen for hidden volume arrivals. VSS will stop listening after all volumes that contribute to a shadow copy set appear in the system or a time-out occurs. If some disk or volume devices fail to appear in this window, the requester will be told that only some of the shadow copies were imported by VSS returning VSS_S_SOME_SNAPSHOTS_NOT_IMPORTED to the requester. The requester will also receive the same error from VSS if the VDS_LUN_INFORMATION structures received from the GetTargetLuns and IVssHardwareSnapshotProvider::FillInLunInfo methods do not match.

This method cannot be used to map shadow copy LUNs as read-only.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vsprov.h

See also

AreLunsSupported

FillInLunInfo

GetTargetLuns

IVssHardwareSnapshotProvider

VDS_LUN_INFORMATION