Previous | Home

Sundry Source

This is the section of the site where I get to display my wares. This is the place where I invite you to take a look (at your own mortal risk ;) at stuff that I have spilled blood creating.

All the links provided below (for source code) refer to zip files containing Microsoft Visual C++ 6.0/7.0 project files apart from the actual source. So if you have a copy of Visual C++ with you, then you can straight away build the source instead of downloading the binary.

Enjoy!





Type Information Browser

There is no dearth for programs that do a good job of laying a type-library bare. I wrote this one as part of my own efforts at demystifying the ITypeLibs and the ITypeInfos. If reading the source code makes absolutely no sense, relax, you are not the first one. In fact if reading the source code makes everything immediately clear, then you should really really consider going on a holiday (without lugging your laptop along) as your sanity is in mortal danger! Reading type information is one of the least documented obnoxious quirks that one can associate with COM. I've put up a description of type-libraries and the general strategy that you may adopt in reading them on this site (both for you, my gentle reader and for myself!). Click here to read it now.


TDial (Phone dialer)

This program here is a simple phone dialer based on the Telephony API (TAPI) that comes packaged with Windows. As before, this was written as a part of my efforts at learning the API. I have written a more sophisticated chat program using TAPI that I am not putting up here for the reason that I am not sure whether it works - you see, I have only one computer, modem (a telephony device for you technocrats) and telephone line, which unfortunately is not adequate for testing purposes. But this program however is fully functional. Obviously, to be able to run the program successfully, you are going to need to have a telephony device attached to your computer (a modem for example) that in turn is connected to a telephone line.


SapiTTS

This is a simple program that makes use of the Speech API (SAPI) specified by Microsoft to do Text-To-Speech conversion. The idea is, you can type in text (or paste from the clipboard) to the program and it'll try to speak it out for you! Please note that for the program to successfully run, you need to have installed a Speech Engine. I think I remember reading that you can download a free engine from Microsofts website. I'll put up a link to the file here as soon as I find it. Secondly, you would need a sound card (and speakers) to be able to actually hear what it says!


TTSDirect

This program invokes the "DirectTextToSpeech" API to perform text-to-speech conversion. It also allows the use of control-tags to manipulate the speech output (through adjustments to pitch, volume, speed, character etc.).


MFC Skeleton AppWizard

This thing here is strictly for users of the Microsoft Visual C++ IDE. How many times have you felt like creating a simple MFC application with only a frame and an application without all the Doc/View crud that the MFC AppWizard generates and found yourself having to manually type it out? Well, I have had to do it often enough to cause me to write a wizard myself. This is a custom wizard that I wrote using which you can build an MFC application with only 2 classes - (i)A class derived from CFrameWnd, and (ii)A class derived from CWinApp. It only writes the wrappers for you (as all the wizards do). But you can save yourself from typing some boiler plate :).

Instructions as to how you can integrate the wizard into your Visual C++ development environment can be found by clicking on the "Download Installation Instructions" link above. Enjoy! :)


HeapPeek - Heap Viewer Program

HeapPeek is a simple heap viewer application that can be used to view the heap of different processes. The UI is fairly intuitive. On running the application you are presented with three columns entitled as "Process List", "Heap(s) List" and "Block(s) List". On selecting a process from the processes list the heaps list column is populated (with heap identifiers that really don't mean much). On selecting a given heap from the heaps list, the blocks list gets populated with a list of allocated blocks in that heap. To dump a given block, just select it in the blocks list and click on the "Dump Block" button. If you check the "Dump to File" option before clicking on "Dump Block", you get to save the block to a file (and may be later on view it in a proper binary file viewer). The block is dumped to the "Memory Dump" text box in hexa-decimal format. Additionally, you can also enter a memory address in the "Memory Address" text field (in decimal format), enter a count of bytes to read from that memory address and click on "Fetch" to fetch the specified number of bytes and dump it into the "Memory Dump" text box. As before you can also dump it into a file.

The executable, a link to which has been given above has been tested successfully on a Windows 98 (Second Edition) machine. I am not sure whether it will work on earlier systems since the program invokes the Tool Help API that is a part of the system kernel. If you are running Windows 2000 however, you may want to download and build the source given above. Additionally, on 2000, the program will fail when it attempts to read the heap of certain system processes (like "inetinfo" for instance). I figured out a work-around for this by having HeapPeek run as a system service. To install HeapPeek as a system service build the other two projects included with the 2000 version of HeapPeek, namely, "sc" and "SvcHeapPeek". SvcHeapPeek is the actual system service. When the service starts up it simply invokes HeapPeek, effectively causing HeapPeek to run with system privileges.

sc is a simple service controller application that will install SvcHeapPeek as a system service. To install the service, build sc and run it from the command line passing the path to the service exe (SvcHeapPeek) as an argument. To run the service, go to the Services management console and start the service called "HeapPeek - Simple Heap Walker Service". When you start the service, the service EXE simply spawns HeapPeek. This implies that you put the HeapPeek executable file in one of the directories specified in the PATH environment variable.


RIFFExplorer - Resource Interchange File Format (RIFF) File Explorer

RIFFExplorer is an application that parses and presents a graphical representation of RIFF format files such as .wav and .avi. It presents the information in a two-pane dialog with a tree-view on the left displaying the chunk and list objects found in the file.  The source code includes a full-fledged RIFF file parser class called CRIFFParser. This class is also used in the WavePlayer application described below.


WavePlayer

This program employs the low-level waveOut* API to load, parse and play Pulse Code Modulation (PCM) waveform music/sound files. This is more of a programmer's utility that can be used to manipulate/test/view the multimedia system (including the audio codecs) installed on a computer.

Previous | Home

1