Sunday, 23 July, 2006

Cabinet Files Revisited

Two years ago I developed some code to access Microsoft CAB files from .NET programs.  Due to some limitations in writing managed C# callbacks, the implementation was kind of messy.  Still, I was able to get the code running and I published a series of three articles about the code on DevSource.  Since October of 2004, the source code for those articles has been among the most popular downloads from my site.

Microsoft released .NET 2.0 last fall, and since then I've received many requests for a .NET 2.0 version of the code.  The addition of the UnmanagedFunctionPointerAttribute in .NET 2.0 completely eliminates the C# callbacks restriction and made the implementation much cleaner.  I finally finished the conversion to .NET 2.0, including a full Visual Basic version and some bug fixes to the original .NET 1.1 code.  DevSource published my new article, Cabinet Files Revisited, today.

You can download the .NET 1.1 source from my web site at  That file includes fixes for all reported bugs.  The .NET 2.0 code, which includes the C# and Visual Basic implementations, is available at