libwin 0.1.5 Read Me File
~~~~~~~~~~~~~~~~~~~~~~~~~

libwin Copyright (C) 1997-2002 by Richard Dawe
Portions Copyright (C) 1997-1998 by the RegDos Group

Richard Dawe: <richdawe@bigfoot.com>
              http://www.bigfoot.com/~richdawe/

RegDos Group: <alfons@hoogervorst.demon.nl>
              http://www.hoogervorst.demon.nl/~proteus/

Description
-----------

libwin is a library of functions for DJGPP. The aim of the library is to
allow DJGPP programs to make better use of the Windows environment. Thus, it
includes clipboard access, user information, version information, low-level
device driver (VxD), DOS box and virtual machine titling and registry
functionality.

Most of these functions will only work under Windows '95 and '98,
but some less complicated functions will work with Windows 3.x
and Windows ME. Many of the functions will not work under
Windows NT, 2000 or XP.

License Details
---------------

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

(Please see the file license.txt.)

Using the Binary Distribution
-----------------------------

Unzip the distribution preserving the directory structure (use -d
switch if you do that with PKUNZIP) from the top DJGPP installation
directory, e.g.:

     cd c:\djgpp
     pkunzip -d c:\path\lwin015b.zip

libwin should now be ready to use - please read the section 'Using libwin in
Your Programs' below for more information.

Building libwin from the Source Distribution
--------------------------------------------

[ If you just want to use libwin in programs, you do not need the source ]
[ distribution - just get the binary distribution.                       ]

To build libwin from sources requires the following packages:

. DJGPP development environment, v2.01 or later
. GNU C compiler, gcc
. GNU C++ compiler, g++
. GNU binutils
. GNU make
. GNU bash
. GNU sed
. GNU fileutils

If you want to run the man page to HTML convertor (see the directory
tools/m2h/), then you will also need Perl. You should not need to run this,
since libwin is supplied with the pages in HTML form.

Unzip the distribution preserving the directory structure (use -d
switch if you do that with PKUNZIP) from the top DJGPP installation
directory, e.g.:

     cd c:\djgpp
     pkunzip -d c:\path\lwin015s.zip

Now change directory into 'contrib\lwin015'. Edit Makefile.cfg to change the
global options. You may like to add the debug switch '-g' to CFLAGS. Type
'make' to see the available targets, or 'make all' to compile everything and
build the library. 'make install' will then install the header files and
library into the correct directories for DJGPP. 'make installman' will install
the man pages into the correct directory for DJGPP.

Using libwin in Your Programs
-----------------------------

Having installed either the binary or source distribution, you simply need to
include the libwin header file and link in the library, e.g. using:

    #include <libwin.h>

in the source code, and the option

    -lwin

when linking. The code should also call the function win_init() before using
any of the functions in the library. I would recommend making this the first
call in main(), as this also makes some DJGPP functions work correctly (i.e.
as they would on Unix).

The commands are documented in the man pages ('man libwin'), or the
hyperlinked HTML versions - see contrib\lwin015\html\index.html off the DJGPP
directory. If this information is not good enough, either look at the source
code, or mail me and I'll try to help.

Further Information
-------------------

- Ralph Brown's Interrupt List  - This is an indispensible guide to
  programming under DOS, but it covers a lot of low-level Windows too. It can
  be downloaded from:

    http://www.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html

  An HTML version is available from:

     http://www.ctyme.com/

- Microsoft Developer's Network on the Web: http://www.microsoft.com/msdn/ or
  http://www.eu.microsoft.com/msdn/ - This is highly Windows-oriented, but
  some of the low-level information was useful when messing about with VxDs.
  It's free to register too.

- Win32 API reference - My copy of this came with a free MSDN sampler, but
  there are references on the internet. Unfortunately I cannot remember any
  URLs. This was useful when I was documenting the registry functions. If you
  can't understand what I've written (quite likely I think ;) ), then one of
  these might help. There's an O'Reilly book on the Windows '95 registry too,
  but that might go into too much detail.

- The VxD Programmer's FAQ - Mostly about developing device drivers with the
  Windows '95 Device Drivers Kit (DDK), but has some information that is
  relevant to DOS programming.

Thanks
------

- Thanks to Indrek Mandre, for the original inspiration.

- Thanks to Alfons Hoogervorst and the rest of the RegDos Group, whose registry
  access code stopped me from giving up on this library. I think, in fact, that
  their code makes up about half the library, if not more. I'll have to remedy
  this by coding more.

- Thanks to Randy Maas for making some suggestions a long time ago, which I
  cannot recall (I think I implemented them though).

- Thanks to the DJGPP newsgroup for providing me with some information.

- For more thanks, see changes.txt.

Rich Dawe <richdawe@bigfoot.com> 2002-09-29
