August 3, 2001·
Spout
Hanging Out My Shingle
Friday, 8/3/01
For the last three years, I’ve been in management. Oh, it started innocently
enough. When the team was small, I was only managing a little bit. However, as
the team grew and we got closer and closer to shipping our first product, I
spent less and less time doing anything technical and more and more time
managing. Eventually, I was doing nothing but dealing with the rest of the
company and potential customers and “enabling” everyone else. Luckily, Don Box,
co-founder of DevelopMentor and my long-time mentor, noticed that I’d been
swept right out of the things that I loved the most. And he made me an offer I
couldn’t refuse…
Now I’m back on the consulting, teaching, writing, development train and loving
it. I’ve been all over .NET for about a year, but now I get to concentrate on
it full-time. If you’d like any consulting help in the area of .NET (or even
COM and ATL), I’m here for you. Pass the word along. Thanks!
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.
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.
July 28, 2001·
Tools
Attila
Attila stands for “ATL for Applications.” Attila is a set of extensions built
on top of ATL to provide application-level services in the same flavor as MFC.
Towards that end, Attila uses a lot of the same notions as ATL, e.g. heavy use
of templates, static binding and reliance on the compiler and the linker doing
their job. Also, in the flavor of ATL, Attila is under-documented and
requires a lot of user investment to make use of it. However, once you do, we
think you’ll find the flexibility and efficiency worth it. If you don’t, you
haven’t lost much, ’cuz Attila is free. Enjoy.