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.



Views expressed in this blog are those of the author and do not necessary reflect those of the author's employer. Views expressed in the comments are those of the responding individual.

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


About Jim ...


Click **here**
to try out MailWrench;
a command-line SMTP /
SMTPS (Google Gmail)
mailer for Windows.


Follow me on Twitter

http://twitter.com/lawlessGuy


Recent Posts

A JavaScript REPL for Android Devices

MailSend is Free

My Blog Engine

The October 10th Bug

A Review of Kevin Mitnick's Book Ghost in the Wires

Spellbound by Web Programming

Backlinks to my Blog Posts

Play MP3 Files with Python on Windows


Random Posts

A Data Manipulation Library for TAP

An Interview with Tom Zimmer: Forth System Developer

Screen Captures with Java and Clojure

Compiling Rhino JavaScript to Java

An SMTP Server Simulator in Perl

Thwarting HTTP Referer Trackbacks

A Review of Kevin Mitnick's Book Ghost in the Wires

BSave and BLoad for the Commodore 64

Expanding Shortened URL's

Flirting with Forth


Full List of Posts

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


Recent Posts from my Other Blog

Remembering Dr. San Guinary

Why Some Web Sites will go Dark on Jan 18th

SNL Superhero Skit

More Ruby Games

My Ruby Game Challenge Entry

Steal this Bookmarklet

Nerd Toys

Learn New Jargon, You Must

Spot the Wiebe

Tech Magazine Glory Days

Book Review : Paull Allen - Idea Man

A 90's Experiment in Online Systems - The U.S. West CommunityLink Service