Back to the WFC main page


Click here or here to download the samples for WFC.

ChangeServiceConfiguration - Command line utility that allows you to change when a service starts up. Normally you have to do this from the Control Panel Services applet. But what if you need to change it from within a CMD script? This program demonstrates how to use:

ClockSync - Simple service that keeps the NT machine's clock synchronized with a designated server. This program demonstrates how to use: Crypto - Demonstrates how to use the Crypto API classes. It enumerates the algorithms provided, encrypts and decrypts data. This program demonstrates how to use: Data - Shows how to send operating system (endian) neutral data over a socket (or file, or serial port, etc). I've used these classes for the basis for serializing objects between an NT client and Unix server. Designed for ease of use and to be fairly high speed. The demo program creates a server socket (listening socket) that reads an object that has been serialized via the Data classes. The client connects to the server using a TCP/IP socket and sends a serialized object to it. This program demonstrates how to use: DeMangle - Undecorates C++ mangled names. When you see a map file of exported functions, the names are always mangled. This demo program shows you how to use the UnDecorateSymbolName function to decrypt the names. DriverMover - A simple GUI that I wrote one afternoon while attending OSR's NT kernel mode device driver course (a very good course by the way). It is a dialog based MFC GUI that will move your device driver over to a remote machine, start or stop the driver, or reboot the machine. When you write device drivers for NT, you typically (unless you are very brave) have two machines connected via a serial port. The WINDBG tool uses the serial line to debug the target machine. If you have the target machine on the network, this little tool will save you some time by eliminating the need to move your device driver to floppy and sneaker-net it over to the target. It saves it's state to the registry so when you execute it, it starts where you left off (this means you don't have to fill in the edit controls every time you start the program). This program demonstrates how to use: DumpEventLog - Shows how to dump the event log. This program demonstrates how to use: EnableRASLogging - Shows how to turn RAS logging on or off. Turning RAS logging on makes it easy to debug auto-logon scripts. This program demonstrates how to use: EventPager - I'm not finished with this one yet. It will be a service that will let you watch event logs on any number of servers and send alerts to alphanumeric pagers based on whatever criteria you want. It will use: GetWebPage - Gets weather information from the Internet and sends it to your pager. It does the following:
  1. Waits for the phone to ring
  2. Waits for the phone to stop ringing
  3. Logs onto Internet (using RAS)
  4. Retrieves the web page(s)
  5. Logs off of Internet (hangs up RAS)
  6. chews on the web pages
  7. Dials the pager company's computer
  8. Sends the data to the proper account
  9. Hangs up
  10. Goto step 1.
You can use this method to retrieve any information from the net and do whatever you want with it. Retrieve stock quotes, weather, flight status, etc. This program demonstrates how to use: HTML - This is the toy I use to pull the HTML pages out of the CPP source code files. It is kind of like an automatic documentation generator.

KillDoc - This program empties the Most Recently Used document list on your desktop. This program demonstrates how to use:

  • CRegistry LastEvent - Shows how to read the event log. It prints the last few entries in the event log to the screen. Uses the following classes: Listen - Simple console program that demonstrates how to use the CListeningSocket. Uses the following classes: ListProcesses - Console program that prints tons and tons of information about the running processes in a system. Uses the wfc_undocumented_get_system_process_list() function to do this. Map2Def - This is the toy I use to create .DEF files for DLLs. It avoids the traps of __declspec( dllimport ) and __declspec( dllexport ). Microsoft doesn't use these in MFC so why should I use them? It will also automatically generate a random BASE= address (in the proper address range) so you won't get DLL relocations at runtime. After each function that is exported in the resulting MAP file, the unmangled C++ name will be included as a comment. This allows you to easily locate C++ member functions that you do not want exported.

    PasswordFilter - This demonstrates how to accomplish a single user logon system. It allows you to intercept user password changes. You get the new password as a string that you can do anything you want with. For example, you could get the new user's password and logon onto a Unix (yech!) box and change the user's password there. This sample program simply logs the new password to a text file. The DLL in this project demonstrates how to correctly export the InitializeChangeNotify() and PasswordChangeNotify() functions. This program demonstrates how to use:

    Ping - Simple console ping program. This program demonstrates how to use: Pinger - This was a service I wrote that would execute a command-line ping on a machine every so many minutes. I used it to keep a RAS connection up when the server would disconnect me due to inactivity. I wrote it before I wrote CPing. This program demonstrates how to use: RasAdmin - Basically shows how to enumerate the ports dedicated to RAS. This program demonstrates how to use: Serial - Little program that simulates a brain dead GPS unit. Spits out a string to the serial port every two seconds. This simulates a NMEA0183 device. This program demonstrates how to use: Service - Command line utility that tells you what services are running on your local machine or a machine on the network. Handy little tool. This program demonstrates how to use: SkyPage - Really brain dead sample of how to page someone using the Skyword system. This program demonstrates how to use: Squiggle - A GUI program that demonstrates how to create oscilloscope and constellation type programs. This program demonstrates how to use: SprintSpectrum - This was supposed to be as silly as SkyPage but I added a neato little routine that waits for the phone to ring then pages you with the time it rang. It gives you an idea of how to get NT to do something in response to the phone ringing and then paging you with the results. This program demonstrates how to use: Test - This is the mother of all WFC samples. It is what I use to test the classes. It doesn't test all methods on an object but it does an OK job. This program demonstrates how to use: TortureXML - This is my test program for creating tortureous XML files. I've wasted a lot of time getting my XML classes working according to the specification. This tool creates valid, well-formed, standalone XML files that will stress an XML parser to its limits.

    USNOTime - Simple command line utility that synchronizes the computer clock with the US Naval Observatory Atomic Clock. This program demonstrates how to use:

    WatchDog - This is actually a useful service. It watches services on the local machine or a remote machine and makes sure they are running. If it finds one that is not running (either because it blew up or an operator stopped it) it will automagically restart the service. Like a good service, it records in the event log when it restarts an errant service. This program demonstrates how to use: XML - Shows how to parse and write XML documents. This program demonstrates how to use: XMLCheck - Checks XML files for well formedness. This program demonstrates how to use: XMLExplorer - This is an Explorer-like application that parses XML documents and puts them into a hierarchical tree. It is an MFC gui app. This program demonstrates how to use: XMLUser - Shows how to enumerate through all the user accounts on a machine and have the data written out in XML format. It demonstrates how to serialize objects using XML. Uses: