Using Win32 functions in Visual FoxPro Image Gallery
Virtual Hard Disk (Win7)
Code examples:
..msdn    Add comment     W32 Constants      Translate this page
Opens a virtual hard disk (VHD) for use.
Code examples:
DWORD OpenVirtualDisk(
    __in   PVIRTUAL_STORAGE_TYPE VirtualStorageType,
    __in   PCWSTR Path,
    __in   VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask,
    __in   OPEN_VIRTUAL_DISK_FLAG Flags,
    __out  PHANDLE Handle
FoxPro declaration:
DECLARE LONG OpenVirtualDisk IN virtdisk;
    STRING @VirtualStorageType,;
    STRING ImageFilePath,;
    INTEGER VirtualDiskAccessMask,;
    INTEGER VirtualDiskFlags,;
    STRING @VirtualDiskParameters,;
    INTEGER @Handle
VirtualStorageType [in]
A pointer to a valid VIRTUAL_STORAGE_TYPE structure.

Path [in]
A pointer to a valid path to the virtual disk image to open.

VirtualDiskAccessMask [in]
A valid value of the VIRTUAL_DISK_ACCESS_MASK enumeration.

Flags [in]
A valid combination of values of the OPEN_VIRTUAL_DISK_FLAG enumeration.

Parameters [in]
An optional pointer to a valid OPEN_VIRTUAL_DISK_PARAMETERS structure. Can be NULL.

Handle [out]
A pointer to the handle object that represents the open virtual disk.
Return value:
If the function succeeds, the return value is ERROR_SUCCESS (0) and the Handle parameter contains a valid pointer to the new virtual disk object.

nResult = OpenVirtualDisk(;
    STRCONV("d:\vdisks\vd001.vhd", 5),;
My comment:
Minimum supported client: Windows 7

When an application is finished using the object handle returned in the Handle parameter, use the CloseHandle function to close the handle.

See also: CreateVirtualDisk, AttachVirtualDisk
Word Index links for the OpenVirtualDisk :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2010-11-01 20:06:32
Modified: 2010-11-01 20:13:52
Visited in last 7 days: 46
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
11 sec.Function: 'EnumClipboardFormats'
22 sec.Function: 'GetKeyboardLayoutName'
33 sec.Function: 'CeRapiInvoke'
44 sec.Function: 'AddClipboardFormatListener'
53 sec.Function: 'SetLayeredWindowAttributes'
1.03 min.Function: 'RealGetWindowClass'
1.2 min.Function: 'PathFindExtension'
1.37 min.Function: 'WinHttpReceiveResponse'
1.52 min.Function: 'PathCombine'
1.65 min.Function: 'TerminateProcess'
Advertise here!