Jim Lawless' Blog


Throwaway Software: HangUp

Originally published on: Sat, 09 May 2009 17:48:38 +0000

I have been selling a couple of niche command-line e-mail utilities for a number of years. In the days when dialup Internet access was more prevalent, many of my customers had asked if I also sold a command-line utility that would hang up their phone connection. In those days, it was more expensive to stay connected to a dialup provider.

I really didn't have any such utility and had no plans for making one, but I decided that I could offer my customers good service by taking the time to provide this supplement. So, I did. I threw this little utility, HangUp, together.

hangup.c


// License: MIT / X11
// Copyright (c) 2009 by James K. Lawless
// jimbo@radiks.net http://www.radiks.net/~jimbo
// http://www.mailsend-online.com
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

// Find the first RAS connection and hang it up.

#include <stdio.h>
#include <windows.h>
#include <ras.h>

#pragma comment(lib, "rasapi32.lib")

main(int argc,char **argv)
{
   RASCONN r;
   DWORD siz,num;

   printf("Hang Up! V 2.0\nCopyright (c) 2009 by Jim Lawless\n");
   printf("(See MIT/X11 license in the source code)\n");
   r.dwSize=siz=sizeof(RASCONN);
   RasEnumConnections(&amp;r,&amp;siz,&amp;num);
   if( num == 0 ) {
      printf("No connections found! Terminating.\n");
      exit(1);
   }
   RasHangUp(r.hrasconn);
   Sleep(3000);
   printf("Done.\n");
   exit(0);
}

The program simply looks for the first Remote Access Services (RAS) connection, hangs it up, and waits three seconds before exiting.

It took me longer to set the product up on my credit-card processor's page than it did to actually write. ;-)

So, I began selling HangUp for ten dollars and was pleased with the small number of sales that it made. I was aware that Microsoft had begun to incorporate a hangup feature into their RasDial utility for the Windows NT family of products, so I knew the lifespan of my product was limited.

Although the modest amount of sales had more than compensated me for the time I had spent building the utility, a representative from a decently-sized business contacted me to see about bulk-licensing.

The corporate staff of this business used laptops with dialup connections while traveling. The versions of Windows on each laptop varied. He needed a utility that would hang up a RAS connection that was exactly the same on each machine. So, I agreed on a bulk purchase of $2,000.00 for several hundred licenses.

Later, a software-vendor non-exclusively licensed the C source code to the app so that they could integrate the functionality directly into one of their Windows programs.

By the time I had retired the utility, I had grossed $2,550.00 in sales and licensing.

The history of this product still fascinates me. In my mind, this was a throwaway utility. Based on the time commitment to coding, selling, and supporting it, HangUp was a nice little source of income.

The source and EXE for HangUp can be found here.

http://www.mailsend-online.com/wp/hangup.zip

Unless otherwise noted, all code and text entries are Copyright ©2009 by James K. Lawless.

del_icio_us Save to del.icio.us
stumbleupon Save to StumbleUpon
digg Digg it
reddit Save to Reddit
facebook Share on Facebook
twitter Share on Twitter
aolfav More bookmarks



Previous post: Safe Scripting with Scroll Lock and Caps Lock
Next post:BPL: Batch Programming Language Interpreter


Search this Blog (and site)

Search this Site with PicoSearch


Subscribe to this Blog

 Subscribe!


Contact Me

Email: jimbo@radiks.net


Follow me on Twitter

http://twitter.com/lawlessGuy


Recent Posts

Mad Schemes : Learning Lisp via SICP

Auto Save Clipboard Images Redux

Extending SpiderMonkey JavaScript on Windows

Rhino JavaScript to EXE with launch4j

Compiling Rhino JavaScript to Java

Directory Traversal in Rhino JavaScript

Taking Shape

We've Moved!


Popular Posts

A Command-Line MP3 Player for Windows

Auto Save Images from the Clipboard

Java in a Windows EXE with launch4j

An Interview with Tom Zimmer: Forth System Developer

Setting Windows Console Text Colors in C


Random Posts

A DSL in JavaScript

Auto Save Images from the Clipboard

Embedding JavaScript in a Batch File

JRuby as a Java Obfuscation Utility

Twimmando: A Command-line Twitter Client

My Big Shareware Splash

An Interview with the Author of the French Silk Assembler

TAP : A Command Processor Library

We've Moved!

Obfuscated C


Full List of Posts

http://www.mailsend-online.com/bloglist.htm


Blogroll

MicroISV on a Shoestring
DadHacker
The Bottom Feeder
Writin' That Code!
The Recursive ISV
The Thomsen Blog
Prototypically Speaking
The Reinvigorated Programmer