|
Gets an array of connected filing cabinets. |
|
|
VARIANT GetCabinets () |
|
|
Return value |
A VARIANT, subtype SafeArray of VARIANTs, subtype BSTRING containing a list of paths to the attached filing cabinets. | | Remarks |
| A user must be logged on to Venice first. |
| This method does not return the list of all existing filing cabinets, only the ones connected for the current Windows User on the current computer (HKEY_CURRENT_USER). |
|
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Get the connected filing cabinets
COleVariant vCabinets = pVenice->GetCabinets ();
if (vCabinets.vt & VT_ARRAY) // Check if the array is empty
{
COleSafeArray saCabinets (vCabinets); // Construct a Safe Array from the VARIANT
VARIANT vCabinet;
long lUB, lInd;
saCabinets.GetUBound (1, &lUB); // Get the upper bound of the array
for (lInd = 0; lInd <= lUB; lInd++)
{
saCabinets.GetElement (&lInd, &vCabinet);
// Process vCabinet
}
}
|
|
|
C# |
|
// Get the connected filing cabinets
Array aCabinets = (Array)oVenice.GetCabinets ();
if (aCabinets != null)
{
foreach (Object oCabinet in aCabinets)
{
// Process oCabinet
}
}
|
|
|
VBS |
|
Dim vCabinets, vCabinet
' Get the connected filing cabinets
vCabinets = oVenice.GetCabinets
If Not IsEmpty(vCabinets) Then
For Each vCabinet In vCabinets
' Process vCabinet
Next
End If
|
|
|
VB.NET |
|
Dim oCabinets, oCabinet As Object
' Get the connected filing cabinets
oCabinets = oVenice.GetCabinets()
If Not IsNothing(oCabinets) Then
For Each oCabinet In oCabinets
' Process oCabinet
Next
End If
|
|