tools

August 7, 2001 tools

Setting the Completion Character

Aug 7, 2001

Whenever I set up a new machine (which happens a lot as WinXP and .NET go through their beta & RC cycles), I always need to manually set up the completion character (to TAB, of course) in the Registry. Shawn VanNess posted a .rgs file that would set this up without the lengthy search through the Registry. Inspired by Shawn, here’s my own completionChar.reg that doesn’t require a program to parse .rgs files (which doesn’t come with Windows).

BTW, if you don’t know about the command shell’s Completion Character, stop right now, run the completionChar.reg file, start up a WinNT/Win2K/WinXP command shell, type cd c:\p[TAB]” and watch while the shell expands it to cd C:\Program Files" for you. If you have other directories that start with c:\p”, continue to hit [TAB] to cycle through them. This works for any directory or file name and it boosts my productivity by about 100% on the command line. I can’t live without it!

August 6, 2001 tools

NullScript Used to Reverse Engineer Gen<X>

Wow. I’m impressed as all get out. Hugh Brown has reverse-engineered Gen<X> as one of the tests of his NullScript implementation. I wish I would have had this when I started Gen<X> a couple of years ago. It would’ve saved me figuring out how ASP did it.

My thinking along these lines years ago led me to go the opposite way, i.e. I built a front-end ASP parser that generated script for VBS. I called it TextBox (which, as a Win32 programmer, I should’ve realized was a terrible name…).

August 5, 2001 tools

Moniker Wizard

Here’s my moniker wizard that includes the framework used by the Basic Monikers.

August 4, 2001 tools

Tim’s COM+ Utilities

Aug 4, 2001

The great and powerful Tim Ewald (author of Transactional COM+: Building Scalable Applications and personal friend of mine) put together a handy little set of COM+ classes and utility functions in a concise header file that he has graciously allowed me to host. Among my favorites are IsInActivity, IsInTransaction, IsSecurityEnabled, GetCallersName,  IsCallerInRole, and parameterized versions of CoGetObjectContext and GetAspObject (which is even cooler than my CAspPtr). Download the code! Buy the book! Feed your brain!

August 3, 2001 tools

Command Line Parsing

Aug 3, 2001

I got tired of not having getopt under Win32 and the best version to port doesn’t handle slashes (as per the Windows standard) or @files for arguments and it requires you to give away the source for every app that uses it, so, inspired by my friend Josh Gray,  I built my own. It supports typed flags and params, @file support and building full usages on the fly.

Plus, the latest version has support for parsing ANSI or Unicode argfiles, as provided by Johan Nilsson. Thanks, Johan! Also, I’ve added a contribution by Paul Westcott to support arguments with restricted values. Thanks, Paul! And, as if that weren’t enough, Adis Delalic contributed a UML diagram to describe how the CLP is built. Wow.

And as if that weren’t enough, Keith Brown ported the command line parser to VS.NET. Thanks, Keith!

August 2, 2001 tools

Expando Objects

Aug 2, 2001

I’ve seen lots of interest lately in expando objects, e.g. objects that can add methods and properties on the fly. Joe Graf wrote a piece on IDispatchEx in MIND that was pretty interesting. My own implementation of IDispatchEx is available here. It supports expando objects that have no static properties or methods as well as those that do. Check out the DispExTest.js for a demonstration, dispeximpl.h, dynamemlist.h and dynamemlist.cpp for the implementation and MyExpando.h for the usage.

August 1, 2001 tools

Windows Template Library

Aug 1, 2001
July 31, 2001 tools

VARIANT_BOOL Wrapper

July 31, 2001

CComBool is a class to prevent the misuse of the VARIANT_BOOL type. VARIANT_BOOL is a problem because its legal values are -1 and 0 instead of 1 and 0, making converting back and forth between bool, BOOL and VARIANT_BOOL problematic. CComBool supports the constructors and operators needed to convert between the three C++ Windows Boolean types. It also supports operator& and CopyTo for common COM client and server usage. CComBool is available here.