# Path: os_win/utils/winapi/wintypes.py
# BYTE = ctypes.c_byte
# WORD = ctypes.c_ushort
# DWORD = ctypes.c_ulong
# CHAR = ctypes.c_char
# WCHAR = ctypes.c_wchar
# UINT = ctypes.c_uint
# INT = ctypes.c_int
# DOUBLE = ctypes.c_double
# FLOAT = ctypes.c_float
# BOOLEAN = BYTE
# BOOL = ctypes.c_long
# ULONG = ctypes.c_ulong
# LONG = ctypes.c_long
# USHORT = ctypes.c_ushort
# SHORT = ctypes.c_short
# LONGLONG = _LARGE_INTEGER = LARGE_INTEGER = ctypes.c_longlong
# ULONGLONG = _ULARGE_INTEGER = ULARGE_INTEGER = ctypes.c_ulonglong
# LPCOLESTR = LPOLESTR = OLESTR = ctypes.c_wchar_p
# LPCWSTR = LPWSTR = PWSTR = ctypes.c_wchar_p
# LPCSTR = LPSTR = PSTR = ctypes.c_char_p
# LPCVOID = LPVOID = PVOID = ctypes.c_void_p
# HANDLE = ctypes.c_void_p
# LPBOOL = PBOOL = ctypes.POINTER(BOOL)
# PBOOLEAN = ctypes.POINTER(BOOLEAN)
# LPBYTE = PBYTE = ctypes.POINTER(BYTE)
# PCHAR = ctypes.POINTER(CHAR)
# LPDWORD = PDWORD = ctypes.POINTER(DWORD)
# PFLOAT = ctypes.POINTER(FLOAT)
# LPHANDLE = PHANDLE = ctypes.POINTER(HANDLE)
# LPINT = PINT = ctypes.POINTER(INT)
# PLARGE_INTEGER = ctypes.POINTER(LARGE_INTEGER)
# LPLONG = PLONG = ctypes.POINTER(LONG)
# PLONGLONG = ctypes.POINTER(LONGLONG)
# PSHORT = ctypes.POINTER(SHORT)
# LPUINT = PUINT = ctypes.POINTER(UINT)
# PULARGE_INTEGER = ctypes.POINTER(ULARGE_INTEGER)
# PULONG = ctypes.POINTER(ULONG)
# PUSHORT = ctypes.POINTER(USHORT)
# PWCHAR = ctypes.POINTER(WCHAR)
# LPWORD = PWORD = ctypes.POINTER(WORD)
# LPOVERLAPPED = ctypes.POINTER(OVERLAPPED)
#     LPOVERLAPPED_COMPLETION_ROUTINE = ctypes.WINFUNCTYPE(
#         None, DWORD, DWORD, LPOVERLAPPED)
#     LPOVERLAPPED_COMPLETION_ROUTINE = PVOID
# class GUID(ctypes.Structure):
# class OVERLAPPED(ctypes.Structure):
# class SECURITY_ATTRIBUTES(ctypes.Structure):
#     def from_str(cls, guid_str):


import ctypes
from os_win.utils.winapi import wintypes
        ('OpenFlags', wintypes.DWORD),
        ('ParentVirtualStorageType', VIRTUAL_STORAGE_TYPE),
        ('SourceVirtualStorageType', VIRTUAL_STORAGE_TYPE),
        ('ResiliencyGuid', wintypes.GUID)
    ]


# Only V2 is used, we avoid defining a union.
class CREATE_VIRTUAL_DISK_PARAMETERS(ctypes.Structure):
    _fields_ = [
        ('Version', wintypes.DWORD),
        ('Version2', _CREATE_VIRTUAL_DISK_PARAMETERS_V2)
    ]


PCREATE_VIRTUAL_DISK_PARAMETERS = ctypes.POINTER(
    CREATE_VIRTUAL_DISK_PARAMETERS)


class _VHD_INFO_SIZE(ctypes.Structure):
    _fields_ = [
        ("VirtualSize", wintypes.ULARGE_INTEGER),
        ("PhysicalSize", wintypes.ULARGE_INTEGER),
        ("BlockSize", wintypes.ULONG),
        ("SectorSize", wintypes.ULONG)
    ]


class _VHD_INFO_PARENT_LOCATION(ctypes.Structure):
    _fields_ = [

# Path: os_win/utils/winapi/wintypes.py
# BYTE = ctypes.c_byte
# WORD = ctypes.c_ushort
# DWORD = ctypes.c_ulong
# CHAR = ctypes.c_char
# WCHAR = ctypes.c_wchar
# UINT = ctypes.c_uint
# INT = ctypes.c_int
# DOUBLE = ctypes.c_double
# FLOAT = ctypes.c_float
# BOOLEAN = BYTE
# BOOL = ctypes.c_long
# ULONG = ctypes.c_ulong
# LONG = ctypes.c_long
# USHORT = ctypes.c_ushort
# SHORT = ctypes.c_short
# LONGLONG = _LARGE_INTEGER = LARGE_INTEGER = ctypes.c_longlong
# ULONGLONG = _ULARGE_INTEGER = ULARGE_INTEGER = ctypes.c_ulonglong
# LPCOLESTR = LPOLESTR = OLESTR = ctypes.c_wchar_p
# LPCWSTR = LPWSTR = PWSTR = ctypes.c_wchar_p
# LPCSTR = LPSTR = PSTR = ctypes.c_char_p
# LPCVOID = LPVOID = PVOID = ctypes.c_void_p
# HANDLE = ctypes.c_void_p
# LPBOOL = PBOOL = ctypes.POINTER(BOOL)
# PBOOLEAN = ctypes.POINTER(BOOLEAN)
# LPBYTE = PBYTE = ctypes.POINTER(BYTE)
# PCHAR = ctypes.POINTER(CHAR)
# LPDWORD = PDWORD = ctypes.POINTER(DWORD)
# PFLOAT = ctypes.POINTER(FLOAT)
# LPHANDLE = PHANDLE = ctypes.POINTER(HANDLE)
# LPINT = PINT = ctypes.POINTER(INT)
# PLARGE_INTEGER = ctypes.POINTER(LARGE_INTEGER)
# LPLONG = PLONG = ctypes.POINTER(LONG)
# PLONGLONG = ctypes.POINTER(LONGLONG)
# PSHORT = ctypes.POINTER(SHORT)
# LPUINT = PUINT = ctypes.POINTER(UINT)
# PULARGE_INTEGER = ctypes.POINTER(ULARGE_INTEGER)
# PULONG = ctypes.POINTER(ULONG)
# PUSHORT = ctypes.POINTER(USHORT)
# PWCHAR = ctypes.POINTER(WCHAR)
# LPWORD = PWORD = ctypes.POINTER(WORD)
# LPOVERLAPPED = ctypes.POINTER(OVERLAPPED)
#     LPOVERLAPPED_COMPLETION_ROUTINE = ctypes.WINFUNCTYPE(
#         None, DWORD, DWORD, LPOVERLAPPED)
#     LPOVERLAPPED_COMPLETION_ROUTINE = PVOID
# class GUID(ctypes.Structure):
# class OVERLAPPED(ctypes.Structure):
# class SECURITY_ATTRIBUTES(ctypes.Structure):
#     def from_str(cls, guid_str):


# Path: os_win/utils/winapi/libs/virtdisk.py
import ctypes
from os_win.utils.winapi import wintypes

        ('OpenFlags', wintypes.DWORD),
        ('ParentVirtualStorageType', VIRTUAL_STORAGE_TYPE),
        ('SourceVirtualStorageType', VIRTUAL_STORAGE_TYPE),
        ('ResiliencyGuid', wintypes.GUID)
    ]


# Only V2 is used, we avoid defining a union.
class CREATE_VIRTUAL_DISK_PARAMETERS(ctypes.Structure):
    _fields_ = [
        ('Version', wintypes.DWORD),
        ('Version2', _CREATE_VIRTUAL_DISK_PARAMETERS_V2)
    ]


PCREATE_VIRTUAL_DISK_PARAMETERS = ctypes.POINTER(
    CREATE_VIRTUAL_DISK_PARAMETERS)


class _VHD_INFO_SIZE(ctypes.Structure):
    _fields_ = [
        ("VirtualSize", wintypes.ULARGE_INTEGER),
        ("PhysicalSize", wintypes.ULARGE_INTEGER),
        ("BlockSize", wintypes.ULONG),
        ("SectorSize", wintypes.ULONG)
    ]


class _VHD_INFO_PARENT_LOCATION(ctypes.Structure):
    _fields_ = [

        ('ParentResolved', wintypes.BOOL),