Name
RemoveSharedFolder
Description
HRESULT
RemoveSharedFolder([in] BSTR shareName,
[in] LONG flags,
[in] ICallback* jobDoneCallback,
[out,retval] IJob** removeJob);
This function removes a shared folder in the virtual machine.
Parameters
- shareName
-
Specifies the guest pathname of the shared folder to delete.
- flags
-
Must be 0.
- jobDoneCallback
-
An ICallback instance that will be called when the
operation is complete.
- removeJob
-
Returns an IJob object that describes the state of this asynchronous operation.
Return Value
HRESULT
Remarks
- This function removes a shared folder in the virtual machine
referenced by vmHandle.
- It is not necessary to call
VM::LoginInGuest()
before calling this function.
- Shared folders are not supported for the following guest operating systems:
Windows ME, Windows 98, Windows 95, Windows 3.x, and DOS.
- In this release, this function requires the virtual machine to be powered on
with VMware Tools installed.
- Depending on the behavior of the guest operating system, when removing
shared folders, there might be a delay before the shared
folder is no longer visible to programs running within the guest operating
system and to functions such as VixVM_FileExistsInGuest.
Requirements
VixCOM.h, since VMware Workstation 6.0
Example
Dim job
Dim err
Set job = vm.RemoveSharedFolder("/work", 0, Nothing)
err = job.WaitWithoutResults()
If lib.ErrorIndicatesFailure(err) Then
' Handle the error...
End If
Set job = Nothing