Using Win32 functions in Visual FoxPro Image Gallery
Virtual Hard Disk (Win7)
AttachVirtualDisk
CreateVirtualDisk
DetachVirtualDisk
OpenVirtualDisk
Code examples:
OpenVirtualDisk
..msdn    Add comment     W32 Constants      Translate this page
Opens a virtual hard disk (VHD) for use.
Code examples:
Declaration:
DWORD OpenVirtualDisk(
    __in   PVIRTUAL_STORAGE_TYPE VirtualStorageType,
    __in   PCWSTR Path,
    __in   VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask,
    __in   OPEN_VIRTUAL_DISK_FLAG Flags,
    __in   POPEN_VIRTUAL_DISK_PARAMETERS Parameters,
    __out  PHANDLE Handle
);
FoxPro declaration:
DECLARE LONG OpenVirtualDisk IN virtdisk;
    STRING @VirtualStorageType,;
    STRING ImageFilePath,;
    INTEGER VirtualDiskAccessMask,;
    INTEGER VirtualDiskFlags,;
    STRING @VirtualDiskParameters,;
    INTEGER @Handle
Parameters:
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.
Usage:
nHandle=0

nResult = OpenVirtualDisk(;
    @cVirtualStorageType,;
    STRCONV("d:\vdisks\vd001.vhd", 5),;
    VIRTUAL_DISK_ACCESS_ALL,;
    OPEN_VIRTUAL_DISK_FLAG_NONE,;
    @cVirtualDiskParameters,;
    @nHandle;
    )
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  
FreeTranslation.com 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: 61
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.82.79.109)
17 sec.Function: 'GdipCreateFontFamilyFromName'
34 sec.Function: 'GetCompressedFileSize'
51 sec.Function: 'GetFileTime'
1.13 min.Function: 'GdipDisposeImage'
1.42 min.Function: 'SHFileOperation'
1.7 min.Function: 'WinHttpQueryDataAvailable'
1.97 min.Function: 'WinHttpCrackUrl'
2.27 min.Function: 'CryptImportKey'
2.58 min.Function: 'GetSecurityDescriptorOwner'
2.88 min.Function: 'FindNextChangeNotification'
Google
Advertise here!