First post, by sherman

User metadata
Rank Newbie

Hi all, not entirely sure if this is the best subforum to post this, so mods, please feel free to move if necessary.

I would like to introduce my VHD library that I've been working on for a while. It's a C library to read/write/create/convert VHD disk images, and is designed to be used with emulators. In fact, it was originally written for PCem, although I decided to make it emulator agnostic, and there isn't (yet) a PCem patch for the current iteration.

I think I've gotten it to the point of being more-or-less feature complete, including working with fixed/sparse (dynamic)/differencing VHD images. I've recently written conversion routines to convert to/from raw disk images (written mainly to help test the read/write functions). The library can perform a round trip raw-vhd-raw conversion, with the final raw image having an identical hash to the original.

There's still a bit of work to do yet. I'm not entirely sure I want to stick with the current code organisation. Also need to do some work regarding cross-platform large file support (it currently takes the PCem approach of using fseeko64 and friends, and that won't work with MSVC for example). And there's bound to be issues with the file path handling code for differencing images..

I'm looking for feedback and/or assistance with helping to polish the library for a "v1.0" release. How bad is the code? Have I made any silly mistakes (I'm sure the answer will be yes...)? Does the API need improvement? Would anyone even have a use for the library? etc are all questions I'm seeking answers for.

The repository can be found at https://github.com/shermp/MiniVHD Pull requests and issues are welcome 😀

Cheers, and thanks,