[Xitami] Refreshing the Xitami IP address

Thomas J. Hruska xitami@lists.xitami.org
Mon, 09 Jul 2001 22:27:30 -0500


At 03:48 PM 7/8/01 -0500, you wrote:
>I've been a lurker for some time now, I'm using Xitami on a win98 machine
>with all the current updates and a dynamic dial up IP (hoping someone will
>offer cable or DSL where we live soon). What I'm looking for is a piece of
>software that will detect when my machine goes on and off line and close and
>start Xitami at the appropriate times so that the IP address is correct.
>I've tried using ICQ and Net cruiser, both will run Xitami but it closes 2
>seconds later and unfortunately if either of these managed to start the
>server they don't offer the facility to close it when the computer gets
>disconnected.
>
>I hope this explains my dilemma, anybody got any ideas?

To start Xitami from another program is fairly simple to do (e.g. the
system() command in C).

To shut down Xitami from another program is a bit more difficult:
First, enumerate all the Windows and loop through them until you run into
the window name "xiwin32" or "xitami" or something like that.
Then, send a WM_QUIT message to it (or you could try sending the
appropriate message to suspend Xitami instead - WM_QUIT is easier, though).
 Xitami should shut down.

Look under the RAS Services section of MSDN for details on connection
information.

So, here is how your program would work:

1)  Wait for RAS to connect successfully to the Internet.
2)  Start Xiami.
3)  Wait for RAS to disconnect.
4)  Shut down Xitami.
5)  Repeat until you cause your program to quit.

I don't think there is any other way to accomplish what you want to do.
So, now might be a good time to learn how to write Windows programs.
Otherwise, keep searching - there is probably a utility, I just don't need
to use it (cable modems are very nice - 100-200K/sec transfers on avg.).


           Thomas J. Hruska -- shinelight@crosswinds.net
Shining Light Productions -- "Meeting the needs of fellow programmers"
                  http://www.shininglightpro.com/