Name

EnableSharedFolders

Description

HRESULT
EnableSharedFolders([in] VARIANT_BOOL enabled,
                    [in] LONG options,
                    [in] ICallback* jobDoneCallback,
                    [out,retval] IJob** enableJob);

This function enables or disables all shared folders as a feature for a virtual machine.

Parameters

enabled
TRUE if enabling shared folders is desired. FALSE otherwise.
options
Must be 0.
jobDoneCallback
A callback function that will be invoked when the operation is complete.
directoryJob
Returns an IJob object that describes the state of this asynchronous operation.

Return Value

HRESULT

Remarks

Side Effects

Requirements

VixCOM.h, since VMware Workstation 6.0

Example

Dim job
Dim err

' Turn shared folders on.
Set job = vm.EnableSharedFolders(true, 0, Nothing)
err = job.WaitWithoutResults()
If lib.ErrorIndicatesFailure(err) Then
   WScript.Echo("Error: " & lib.GetErrorText(err, empty))
   WScript.Quit
End If

Copyright (C) 2007 VMware, Inc. All rights reserved.