Using Win32 functions in Visual FoxPro Image Gallery
Virtual Hard Disk (Win7)
Code examples:
..msdn    Add comment     W32 Constants      Translate this page
Attaches a virtual hard disk (VHD) by locating an appropriate VHD provider to accomplish the attachment.
Code examples:
DWORD AttachVirtualDisk(
    __in  HANDLE VirtualDiskHandle,
    __in  PSECURITY_DESCRIPTOR SecurityDescriptor,
    __in  ULONG ProviderSpecificFlags,
    __in  LPOVERLAPPED Overlapped
FoxPro declaration:
DECLARE LONG AttachVirtualDisk IN virtdisk;
    INTEGER VirtualDiskHandle,;
    INTEGER SecurityDescriptor,;
    INTEGER VirtualDiskFlags,;
    LONG ProviderSpecificFlags,;
    STRING @VirtualDiskParameters,;
    INTEGER Overlapped
VirtualDiskHandle [in]
A handle to an open virtual disk. For information on how to open a virtual disk, see the OpenVirtualDisk function.

SecurityDescriptor [in]
An optional pointer to a SECURITY_DESCRIPTOR to apply to the attached virtual disk. If this parameter is NULL, the security descriptor of the virtual disk image file will be used.

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

ProviderSpecificFlags [in]
Flags specific to the type of virtual disk being attached. May be zero if none are required.

Parameters [in]
A pointer to a valid ATTACH_VIRTUAL_DISK_PARAMETERS structure that contains attachment parameter data.

Overlapped [in]
An optional pointer to a valid OVERLAPPED structure if asynchronous operation is desired.
Return value:
If the function succeeds, the return value is ERROR_SUCCESS (0).
nResult = AttachVirtualDisk(;
My comment:
Minimum supported client: Windows 7

The caller must have SE_MANAGE_VOLUME_PRIVILEGE access rights (SeManageVolumePrivilege).

See also: DetachVirtualDisk, OpenVirtualDisk,
How to enable the SE_SHUTDOWN_NAME privilege for the application
Word Index links for the AttachVirtualDisk :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2010-11-01 20:14:46
Modified: 2010-11-01 20:51:24
Visited in last 7 days: 98
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
4 sec.
Function group: 'String'
6 sec.Function: 'FindCloseChangeNotification'
8 sec.Function: 'CeGlobalMemoryStatus'
10 sec.Solutions
12 sec.Function: 'FindCloseUrlCache'
15 sec.
Function group: 'GDI+ PathGradient Brush'
17 sec.Function: 'GetCursorPos'
19 sec.Function: 'GetConsoleScreenBufferInfo'
21 sec.Function: 'GetEnhMetaFileHeader'
24 sec.Function: 'GdipTranslateMatrix'
Advertise here!