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.
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, ATLCOM
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.
Dharma Shukla and I wrote “Extending ATL3.0 Containment to Help You Write Real-World Containers” in
the 12/99 issue of MSJ detailing how to add much-needed features to ATL’s
support for control containment. Dharma wrote the sample code that accompanies
the piece and has already made improvements to the code based on feedback. He’s
maintaining the history and bits
here.
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.
The Simple Object IIATL ObjectWizard Extension (whew — I’ve got to come up
with a shorter name…) provides the following features:
Support for [oleautomation] interfaces.
Support for the Neutral-threaded apartment.
Support for IDispatch-based interfaces other than duals.
Better support for disabling features that do not make sense together, e.g. FTM
+ ThreadingModel=Apartment.
Updated pop-up help.
Originally, SimpleObject2 was built to do away with the one benefit of
IDispatchImpl over IDelegatingDispImpl — wizard support. As do most
things developed under the greedy eye of my colleagues, it grew
to support a few more features than that. It’s available for download
here. Enjoy.
I got tired of not having a smart type for SAFEARRAYs, so I built one. It’s
limited to one dimension (does anyone use multi-dimentional SAFEARRAYs?) and
provides one class for the SAFEARRAY and another for the data itself (the lock
is a resource, too), but the usage is pretty nifty. See comvector.h
for the what and the how.
Also, Ron Jacobs sent me an ATL port of COleSafeArray called CComSafeArray that
I’ve made available here.
CComDATE: Wraps the COMDATE type, providing conversions from VARIANT,
DATE, ANSI string, UNICODE string, time_t, SYSTEMTIME, FILETIME, DOS time
and DBTIMESTAMP data types.
CComSpan: Represents the result of subtracting one CComDATE from
another. Useful for time/date math.