Nice post about Virtual Servers 'thumbnail' API

  • Comments 3

In the past I have posted about using Virtual Servers 'thumbnail' API to perform virtual machine automation by checking the visual contents of the virtual machines screen.

Chris Smith has just posted a nice chunk of code that will take the raw data provided by our thumbnail API and turn it into a standard bitmap resource.  This is very handy for anyone wanting to build custom UI for Virtual Server.

The post is available here:


Leave a Comment
  • Please add 5 and 8 and type the answer here:
  • Post
  • Ben

    I carry around a SQL 2005 VPC on a portable HDD as well as some standalone apps. What would be really coool would be if I could install the VPC application on the HDD so it ran purely from the mobile disk as my other portable applications do.

  • Hi MC,

    This is not really possible - as Virtual PC requires that some specific drivers be installed on the host system.

  • While I am happy to see a managed-code usage of the thumbnail API, I am still searching for native-code usage of the thumbnail API to show a picture, in particular for Windows Scripting Host.

    Technically, the thumbnail API returns a SafeArray of 32bit values, so both JScript and VBScript can access it as a VBArray and walk through its values, no problem.

    The problem comes in making an displayable image out of this array - either saving the bits to a filestream or somehow stuffing them into a displayable bitmap object.

    But alas, Scripting.FileSystemObject does not support writing arbitrary binary values in ASCII mode and Unicode mode will insert the Unicode BOM at the beginning of the file, rendering it invalid as a image file.

    And there is no bitmap object available to Scripts that I am aware of (the managed code example gets around this by using the Bitmap managed class).

    It probably would have been nice to have a "SaveThumbnailAsFile" API call, though I can see why it does not exist - when used by the VSWebApp CGI, the bits were just streamed as-is to the browser (it relies on IE interpreting the IMG SRC as a picture), so there was no need for a "save as file" nor "use by bitmap object" functionality.

    Just something to think about... :-)

Page 1 of 1 (3 items)

Nice post about Virtual Servers 'thumbnail' API