tools

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.

July 30, 2001 tools

ATL CRT Numbers

July 30, 2001

The following table lists the various prices you pay for using the CRT and the default Win98 support in VC6. The builds were done with VC6, SP3, ATL COM in-proc server, no classes, no MFC, no merged p/s:

Target CRT Win98 Size
RelMinSize _ATL_MIN_CRT yes 24KB
RelMinDepend _ATL_MIN_CRT yes 24KB
RelMinSize _ATL_MIN_CRT /opt:nowin98* 7KB
RelMinDepend _ATL_MIN_CRT /opt:nowin98 10KB
RelMinSize MSVCRT /opt:nowin98 20KB
RelMinDepend MSVCRT /opt:nowin98 22KB

*Note: /opt:nowin98 is a VC6 linker switch that says not to align binaries on a Win98-friendly boundary. /opt:nowin98 builds will still load and run under Win98 without a problem, but the loading time could be longer. Also, when images get above 24KB, the /opt:nowin98 seems not to much of an affect on the size of the image.


← Newer Entries Older Entries →