A while ago I had to code a vhd to image function for my software CloneDisk.
I followed these specs from MS : http://www.microsoft...ang=en&id=23850 .
Here attached (yet another) a quick & dirty command line tool to convert a fixed or dynamic VHD to a raw image.
Zip file includes source file to help developp other tools around VHD format.
Code needs to be cleanup, debuuged, documented, etc but.. it works and above all I wanted to share with others delphi developpers.
I have created a dynamic vhd under windows 7, added some files in there, dismounted it and converted it to a raw image file which I could successfully mount with imdisk.
Other options can be added like map used clusters, convert the other way around (img to vhd), resize, fixed to dynamic (and vice & versa), etc...
Regards,
Erwan.