Visual Studio 2010!

Read now >

View Now
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.
ADVERTISEMENT
ADVERTISEMENT

 

DevSource.com: Your Source for Visual Studio on Facebook
ADVERTISEMENT
Cabinet Files Revisited
By Jim Mischel

Rate This Article: Add This Article To:

Cabinet Files Revisited - ' How '
( Page 4 of 4 )

'Bout in VB?">

Visual Basic Version

Many readers enquired as to the existence of a Visual Basic version of the cabinet interface code, or at least a compiled .NET assembly and some Visual Basic sample code. As an exercise in becoming more familiar with Visual Basic, I created a full VB.NET version of all the code: the cabinet interface and sample programs.

Converting the code to Visual Basic gave me the opportunity to go through all of the C# code and correct a number of minor errors and a few things that were a bit awkward. I also gained a much better understanding of Visual Basic in the process.

Making Code Better

The inclusion of UnmanagedFunctionPointerAttribute in .NET 2.0 made it much easier to interface with the Cabinet SDK. In addition, interop marshaling appears to be much more cleanly implemented in .NET 2.0. I haven't experienced any of the intermittent failures that plagued me during my development of this code for .NET 1.1. With a fully-function Visual Basic version, VB.NET programmers can include CAB support in their applications without having to worry about learning C# or depending on somebody else to provide a compiled assembly.

The full .NET 2.0 source code and project files, including both C# and Visual Basic versions, is available in a single Microsoft Installer package at www.mischel.com/pubs/cabdotnet/cabdotnet.msi.



 
 
>>> More Using Microsoft Visual Studio Articles          >>> More By Jim Mischel