Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Unmounts a virtual hard disk file (.vhd file) that had been mounted with the MountVHD function.
Syntax
ULONG WINAPI UnmountVHD(
_In_ PWCHAR VHDFileName,
_In_ ULONG Flags
);
Parameters
-
VHDFileName [in]
-
A pointer to a null-terminated Unicode string that specifies the full path to the VHD file. Relative paths to the VHD file are not supported.
-
Flags [in]
-
This parameter is reserved. Use VHD_NORMAL (0).
Value Meaning - VHD_NORMAL
- 0
Unmount the VHD file normally. - VHD_FORCE_UNMOUNT
- 3
Force the system to unmount the VHD file without sending any device eject notification. This could result in a message being logged in the event viewer and data loss and corruption on the mounted file.
Return value
On successful call, the return value is ERROR_SUCCESS (0). Any of the system error codes can be returned. Common return values include the following.
| Return code/value | Description |
|---|---|
|
A value other than VHD_NORMAL (0) or VHD_FORCE_UNMOUNT (3) was passed in the Flags parameter. |
|
An error occurred while unmounting the file. |
|
The device is in use and cannot be unmounted. Passing VHD_FORCE_UNMOUNT in the Flags parameter can force the file to unmount. |
Requirements
| Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
| Header |
|
| Library |
|
| DLL |
|