Click here to Skip to main content
12,253,139 members (54,012 online)
Click here to Skip to main content

Stats

368K views
12K downloads
278 bookmarked
Posted

The Win32 Foundation Classes (WFC) - Version 45

, 16 May 2000
The Win32 Foundation Classes (WFC) are a library of C++ classes that extend Microsoft Foundation Classes (MFC) beyond mere GUI applications, and provide extensive support for system and NT specific applications
HTML
html.dsw
html.mak
html.dsp
sample
Sample
ADO2XML
ADO2XML.dsp
ADO2XML.dsw
ChangeServiceConfiguration
ChangeServiceConfiguration.dsp
ChangeServiceConfiguration.dsw
ChangeServiceConfiguration.mak
ClockSync
ClockSync.dsp
ClockSync.dsw
ClockSync.mak
Counter
counter.mak
Crypto
Crypto.dsp
Crypto.dsw
Crypto.mak
CScript
CScript.dsp
CScript.dsw
Data
Receiver
Receiver.dsp
Receiver.dsw
Sender
Sender.dsp
Sender.dsw
DeMangle
DeMangle.dsp
DeMangle.dsw
DriverMover
DriverMover.dsp
DriverMover.dsw
res
DriverMover.ico
DumpEventLog
DumpEventLog.mak
EnableRASLogging
EnableRASLogging.mak
EventPager
EventPager.dsp
EventPager.dsw
EventPager.mak
messages.mc
GetWebPage
GetWebPage.dsp
GetWebPage.dsw
GetWebPage.mak
HTML
html.dsp
html.dsw
html.mak
KillDoc
KillDoc.dsp
KillDoc.dsw
LastEvent
LastEvent.dsp
LastEvent.dsw
LastEvent.mak
Listen
Listen.dsp
Listen.dsw
Listen.mak
ListProcesses
ListProcesses.dsp
ListProcesses.dsw
Map2Def
Map2Def.dsp
Map2Def.dsw
Map2Def.mak
Microphone
Microphone.dsp
Microphone.dsw
MIME2HTML
Debug
MIME2HTML.dsp
MIME2HTML.dsw
PasswordFilter
DLL
PasswordDLL.dsp
PasswordDLL.dsw
PasswordFilter.dsp
PasswordFilter.dsw
Ping
Ping.dsp
Ping.dsw
Ping.mak
Pinger
MESSAGES.MC
Pinger.dsp
Pinger.dsw
Pinger.mak
Pinger.ver
RasAdmin
RasAdmin.dsp
RasAdmin.dsw
RasAdmin.mak
Serial
Serial.dsp
Serial.dsw
Serial.mak
SerialTest
Normal
Receiver
Receiver.dsp
Receiver.dsw
Sender
Sender.dsp
Sender.dsw
Service
Service.dsp
Service.dsw
Service.mak
SkyPage
SkyPage.dsp
SkyPage.dsw
SkyPage.mak
SprintSpectrum
SprintSpectrum.dsp
SprintSpectrum.dsw
SprintSpectrum.mak
Squiggle
Squiggle.mak
TortureXML
TortureXML.dsp
TortureXML.dsw
USNOTime
USNOTime.dsp
USNOTime.dsw
WatchDog
messages.mc
WatchDog.dsp
WatchDog.dsw
WatchDog.mak
WatchDog.ver
Wfc2Html
Wfc2Html.dsp
Wfc2Html.dsw
WinPage
res
WinPage.ico
WinPage.dsp
WinPage.dsw
WinPage.mak
XML
Debug
XML.DSP
XML.dsw
XMLCheck
Debug
XML
XMLCheck.dsp
XMLCheck.dsw
XMLCheck.mak
XMLExplorer
res
bitmap1.bmp
CXMLExplorerDocument.ico
Toolbar.bmp
XMLExplorer.ico
XMLExplorer.dsp
XMLExplorer.dsw
XMLUser
XMLUser.dsp
XMLUser.dsw
TEST
Grid
Grid.mak
MESSAGES.MC
Pipe
Pipe.mak
TEST.dsp
TEST.dsw
TEST.MAK
XMLConformanceTest
XMLConformanceTest.dsp
XMLConformanceTest.dsw
wfc
HTML
web
INCLUDE
LIB
WFC.dsp
WFC.dsw
WFC.mak
wfcvc42.mak
SRC
<HTML>
<!-- $Revision: 1 $ -->
<H1>Release 41</H1>

<H2>Editorial</H2>

What happened to Release 40? Well, that was a silent release.
It has been up on the website for a while but I didn't advertise
it. Many thanks to pnl.gov for giving me a little code patch
that greatly increased the performance of the parser.

CString sucks!

<H2>This Release</H2>

I've been tweaking the XML stuff, cleaning up the samples and
fixing bugs, tweaking performance, etc.

<P>

In the past six months, I've worked on the 
<A HREF="http://www.w3.org/TR/" TARGET="_parent">XML</A>
classes almost exclusively. I now consider it to be a decent
XML parser. It won't parse UTF-8 encoded documents (ASCII,
UNICODE and UCS4 is OK) but it will write them. It is a
standalone parser. It parses all but two of James Clark's
test files (found at
<A HREF="http://www.jclark.com/xml/" TARGET="_parent">http://www.jclark.com/xml/</A>).
One refers to an external reference (097.XML) and the other is
UTF-8 encoded (063.XML). I started writing the XML classes in the
wrong way. I coded up an XML parser then had to back fill it with
all of the SGML baggage (inconsistencies, complexities and down
right stupidity).
What started as a nice little parser has now turned into an ugly
hairball of code. These changes have really slowed down the parser.
It now takes about 3125 milliseconds (a little over 3 seconds) to
parse Shakespeare's &quot;Love's Labor's Lost&amp; (many thanks to
Jon Bosak for creating the XML). This document is
206,945 bytes long and contains 15,126 elements. I ran the parser on
my development machine (P5-100 with 64MB RAM running Windows NT 4.0
build 1381 service pack 4). Nearest I can figure, Microsoft's XML
parser (MSXML.DLL version 5.00.2314.1000) takes about 11 seconds to
parse the same file (and <B>MUCH</B> longer to display it).

<P>

My XML parser parses bytes. It knows nothing of files, sockets
or other such application-level objects. Because of this, my parser
cannot reach out and touch things that other parsers assume will
be there (like files or web sites). Any communication mechanisms
are assumed to be application level objects and are not available
to my XML parser.<P>

<H2>What's New</H2>

<B><A HREF="CMemoryFile.htm">CMemoryFile</A></B> - A simple memory
mapped file class. It takes care of that silly allocation granularity
alignment problem. I can't remember if this was in release 38 or not
but now it is documented.

<P>

<B><A HREF="wfc_create_hard_link.htm">wfc_create_hard_link</A></B> - If you
just can't wait for that NT 5.0 API <CODE>CreateHardLink()</CODE>, here's
a function that will create two directory entries for one file. In the
good old DOS days, that used to be known as a cross-link error.

<P>

<B>wfc_append_string_to_CByteArray</A></B> - I just got
tired of writing while loops all over the place.

<P>

<B><CODE>wfc_coverage.h</CODE></B> - This header file implements a
simple code coverage analysis system. I use it to test classes
to make sure all the code I've written is actually executed.

<P>

<B><CODE>wfc_linker_setup.h</CODE></B> - This header file fixes the
LNK2005 problems. Turns out, we need to define <CODE>_AFX_NOFORCE_LIBS</CODE>
before we include <CODE>afx.h</CODE>. This header file makes sure
the link libraries are included in the proper order.

<P>

<H2>Bug Fixes/Enhancements</H2>

<B><A HREF="CDataParser.htm">CDataParser</A></B> -
Added more functions. It will interpret charcaters
now. Those characters can be in ASCII, UNICODE
(big and little endian) as well as UCS-4 (big endian,
little endian, unusual 2143 or unusual 3412).

<B><A HREF="CXMLD.htm">CExtensibleMarkupLanguageDocument</A></B> -
I've added more write options. It will now write the document out
in ASCII, UTF-8, UNICODE (big and little endian) and UCS-4
(big endian, little endian, unusual 2143 and unusual 3412).
It will also automatically detect and parse those same character
encodings except UTF-8.
<BR>
You can now specify your own character to separate parents and
children when getting elements via the <B>GetElement()</B> method.
I was using a period (.) but that is a legal name character.

<P>

<B><A HREF="CXMLE.htm">CExtensibleMarkupLanguageElement</A></B> -
Lots of bugs fixed here.

<UL>
<LI>ENTITY's that were only &gt; are now parsed correctly.
<LI>When a parse fails, it will tell you the rule number that caused the failure.
<LI>Lots of little bug fixes
</UL>

<P>

<B><A HREF="CRandomNumberGenerator2.htm">CRandomNumberGenerator2</A></B> -
Now returns something other than zero when you call <B>GetFloat()</B>.

<B>CWfcTrace</B> - Now supports printing SIZE, RECT, POINT, LARGE_INTEGER and
ULARGE_INTEGER structures. A bug where '%' appeared in the output string wasn't
being displayed is fixed.

<HR>
<A HREF="Release38.htm">Release 38 Notes</A><P>
<ADDRESS>Sam Blackburn</ADDRESS>
<ADDRESS><A HREF="mailto:wfc@pobox.com">wfc@pobox.com</A></ADDRESS>
<A HREF="homepage.htm" TARGET="_parent">Return to Sam's Home Page</A>
</BODY>
</HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Sam Blackburn
United States United States
I'm just a simple little NT programmer. Most of the work I do is remote controlling equipment in real time. I started out using Windows 3.0. Then came 3.1 and then NT. I started using NT but unfortunately, Microsoft didn't. I started using MFC but unfortunately, Microsoft didn't (and still doesn't) put any real support for NT into MFC so I wrote a bunch of C++ classes to make my life easier. Like all class libraries, mine grew. Now I'm giving it away, I call it Win32 Foundation Classes.

Check out Sam's homepage at www.SamBlackburn.com/wfc/.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 17 May 2000
Article Copyright 2000 by Sam Blackburn
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid