www.jlion.com

Sunday, June 29, 2008

I've been working on a DLL wrapper for volume shadow copy recently and today I decided to try it out on a 64-bit operating system. I chose Windows Server 2008 and tried to set it up on a VMWare WorkStation v6 virtual machine. The OS installed correctly up until the final reboot, after which I got an error message indicating that my CPU was "cpu not compatible with 64-bit mode". This confused me as I had indicated in VMWare that I would be installing a 64-bit OS.

A little bit of research revealed to me that support for Windows Server 2008 had been released after the initial release of VMWare Workstation 6. I was at version 6.0.0. The most recent release of VMWare workstation 6 is 6.0.4. I thought upgrading to this more recent version might solve my problem and enable me to run Windows Server 2008 in a VMWare virtual machine.

Upgrading didn't work, but I noticed a log message saying something about my CPU not supporting 64-bit VMs. Perhaps it's the Dell Precision M65 laptop that I'm using?

Anyway, for the moment I give up...

When I first started work on the DLL wrapper I ran into some odd error messages. I wasn't sure what the problem could be: everything looked correct each time I reviewed the code. I suspected a COM problem, perhaps something having to do with CoInitializeSecurity and unable to find satisfactory examples on the internet, I finally called Microsoft.

The support rep there was very helpful and after a few minutes was able to discover that I had a header/lib mismatch. With this straightened out and some additional friendly COM and interop advice I was able to quickly get my DLL to work.

One interesting note: One of the microsoft reps that I talked with pointed out this great way to list the functions in a lib: dumpbin /all vssapi.lib >vssapi.txt

If you're interested in Volume Shadow Copy, then this Microsoft Channel 9 interview with some of the developers who worked on Volume Shadow Copy might be of interest. I found the video on the official blog of the storage team at Microsoft. The blog also has lots of great info about volume shadow copy.

The channel 9 interview's description of volume shadow copy in vista inspired me to dig out my MSDN vista CD and install it in a VM. This is the first time I've really looked at Vista, and I'm impressed. I'm looking forward to seeing if my VSS DLL wrapper will work. I know I'll have to recompile it with Vista libs and headers and so am now downloading the Vista SDK.

Thursday, June 12, 2008

I've just finished reading "The Bourne Identity" by Robert Ludlum. I've seen the movie which pro ports to be based on this book several times and found very little similarity. I guess both the book and the movie center around an assassin with amnesia and a girl, but little else seems familiar. The book is engaging but a little mindless.

Which, I guess, makes it a good counterpoint for Dune, which I'm still reading. What I'm finding most interesting about Dune is Frank Herbert's imagining of what it might be like to be able to see the future...to be so aware of every single little detail and how they interact that one can infer how those interactions will combine to create future possibilities, kind of like the butterfly effect. The question here is what role does free will play?

Today I wanted to print out the entire Volume Shadow Copy topic from MSDN. With a web-browser alone this would be a lot of work. Luckily I found that MSDN documents are exposed by a web service. After finding the web service I was thinking to write up a little utility to retrieve each page and print it to a pdf document but then I found this nifty open source utility which allows you to easily export MSDN documentation to a help (chm) file. The help file in turn can be printed.

While looking for the MSDN web service, I happened upon the ProgrammableWeb web site. This web site has a large collection of links to various web services. It's amazing what's out there.

Monday, June 09, 2008

I'm now about a fifth of the way into the audiobook version of Frank Herbert's Dune. This is a book I read as a teenager. I had forgotten how engaging it is.

Are you creating a calendar for your web site? Want to make it easy for folks to add your events to their Microsoft Outlook calendars? A solution is at hand. There's a format called iCalendar that provides for interchange of event information between systems. It's well documented and pretty easy to use. Here's a simple example.

BEGIN:VCALENDAR
PRODID:-//jlion/handcal//NONSGML v1.0//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20080612T140000Z
DTEND:20080612T193000Z
SUMMARY:PM08
ORGANIZER:MAILTO:PAR@par.net
LOCATION:Holiday Inn, Harrisburg/Hershey in Grantville
DESCRIPTION:PM08 Board-General Membership Meeting
UID:1
SEQUENCE: 0
DTSTAMP:20080514T162817Z
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

To add this as event to a web site, save the information as a file with an "ics" extension and link to it. When the user clicks on the link they will be prompted to add the event to their calendar.

A caveat: The times above (DTSTAMP, DTSTART and DTEND) are in UTC. To reflect local time you will need to adjust these times for your time zone or add additional time zone information (see the msdn article or RFC 2445 for more info).

Lots more information about Microsoft's implementation of iCalendar is available at http://msdn.microsoft.com/en-us/library/bb655909.aspx and there is background on the hows and whys of iCalendar on Wikipedia, here: http://en.wikipedia.org/wiki/ICalendar.

It's easy to see how a specific event would be rendered in iCalendar format. Just create the event in Outlook, open it up then select "Save As" from the file menu and change the "Save as Type" drop-down to "iCalendar Format (*.ics)". The resulting ICS file can be opened up in a text editor for your perusal.