From: Louis Lenders xerox.xerox2000x@gmail.com
From: Louis Lenders xerox.xerox2000x@gmail.com Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45947 Signed-off-by: Louis Lenders xerox.xerox2000x@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/virtdisk/virtdisk.spec | 2 +- dlls/virtdisk/virtdisk_main.c | 7 ++++++ include/virtdisk.h | 44 +++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/dlls/virtdisk/virtdisk.spec b/dlls/virtdisk/virtdisk.spec index 6bd5f146db..f35b8df524 100644 --- a/dlls/virtdisk/virtdisk.spec +++ b/dlls/virtdisk/virtdisk.spec @@ -15,7 +15,7 @@ @ stub GetVirtualDiskPhysicalPath @ stub MergeVirtualDisk @ stub MirrorVirtualDisk -@ stub OpenVirtualDisk +@ stdcall OpenVirtualDisk(ptr wstr long long ptr ptr) @ stub ResizeVirtualDisk @ stub SetVirtualDiskInformation @ stub SetVirtualDiskMetadata diff --git a/dlls/virtdisk/virtdisk_main.c b/dlls/virtdisk/virtdisk_main.c index 3e6c5c14dc..1523fd42a4 100644 --- a/dlls/virtdisk/virtdisk_main.c +++ b/dlls/virtdisk/virtdisk_main.c @@ -65,3 +65,10 @@ DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_
return ERROR_SUCCESS; } + +DWORD WINAPI OpenVirtualDisk(VIRTUAL_STORAGE_TYPE *type, const WCHAR *path, VIRTUAL_DISK_ACCESS_MASK mask, OPEN_VIRTUAL_DISK_FLAG flags, + OPEN_VIRTUAL_DISK_PARAMETERS *param, HANDLE *handle) +{ + FIXME("(%p, %s, %d, 0x%x, %p, %p): stub\n", type, wine_dbgstr_w(path), mask, flags, param, handle); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/include/virtdisk.h b/include/virtdisk.h index b4c07f3b69..7c207dd879 100644 --- a/include/virtdisk.h +++ b/include/virtdisk.h @@ -37,6 +37,26 @@ typedef enum _ATTACH_VIRTUAL_DISK_FLAG { ATTACH_VIRTUAL_DISK_FLAG_NO_SECURITY_DESCRIPTOR = 0x10 } ATTACH_VIRTUAL_DISK_FLAG;
+typedef enum _OPEN_VIRTUAL_DISK_FLAG { + OPEN_VIRTUAL_DISK_FLAG_NONE = 0x00, + OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS = 0x01, + OPEN_VIRTUAL_DISK_FLAG_BLANK_FILE = 0x02, + OPEN_VIRTUAL_DISK_FLAG_BOOT_DRIVE = 0x04, + OPEN_VIRTUAL_DISK_FLAG_CACHED_IO = 0x08, + OPEN_VIRTUAL_DISK_FLAG_CUSTOM_DIFF_CHAIN = 0x10, + OPEN_VIRTUAL_DISK_FLAG_PARENT_CACHED_IO = 0x20, + OPEN_VIRTUAL_DISK_FLAG_VHDSET_FILE_ONLY = 0x40, + OPEN_VIRTUAL_DISK_FLAG_IGNORE_RELATIVE_PARENT_LOCATOR = 0x80, + OPEN_VIRTUAL_DISK_FLAG_NO_WRITE_HARDENING = 0x100 +} OPEN_VIRTUAL_DISK_FLAG; + +typedef enum _OPEN_VIRTUAL_DISK_VERSION { + OPEN_VIRTUAL_DISK_VERSION_UNSCPECIFIED, + OPEN_VIRTUAL_DISK_VERSION_1, + OPEN_VIRTUAL_DISK_VERSION_2, + OPEN_VIRTUAL_DISK_VERSION_3 +} OPEN_VIRTUAL_DISK_VERSION; + typedef enum _ATTACH_VIRTUAL_DISK_VERSION { ATTACH_VIRTUAL_DISK_VERSION_UNSPECIFIED, ATTACH_VIRTUAL_DISK_VERSION_1 @@ -156,6 +176,27 @@ typedef struct _EXPAND_VIRTUAL_DISK_PARAMETERS { } DUMMYUNIONNAME; } EXPAND_VIRTUAL_DISK_PARAMETERS, *PEXPAND_VIRTUAL_DISK_PARAMETERS;
+typedef struct _OPEN_VIRTUAL_DISK_PARAMETERS +{ + OPEN_VIRTUAL_DISK_VERSION Version; + __C89_NAMELESS union { + struct { + ULONG RWDepth; + } Version1; + struct { + BOOL GetInfoOnly; + BOOL ReadOnly; + GUID ResiliencyGuid; + } Version2; + struct { + BOOL GetInfoOnly; + BOOL ReadOnly; + GUID ResiliencyGuid; + GUID SnapshotId; + } Version3; + } DUMMYUNIONNAME; +} OPEN_VIRTUAL_DISK_PARAMETERS, *POPEN_VIRTUAL_DISK_PARAMETERS; + typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_1 { DEPENDENT_DISK_FLAG DependencyTypeFlags; @@ -196,6 +237,9 @@ typedef struct _VIRTUAL_DISK_PROGRESS {
DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_FLAG flags, ULONG size, STORAGE_DEPENDENCY_INFO *info, ULONG *used);
+DWORD WINAPI OpenVirtualDisk(VIRTUAL_STORAGE_TYPE *type, const WCHAR *path, VIRTUAL_DISK_ACCESS_MASK mask, OPEN_VIRTUAL_DISK_FLAG flags, + OPEN_VIRTUAL_DISK_PARAMETERS *param, HANDLE *handle); + #ifdef __cplusplus } #endif