------------------------------------------------------
LICENCE.MDB  rel. 1.0
------------------------------------------------------
Environment:
 MS-Access 2.0 or ADT/ADK runtime
------------------------------------------------------

Abstract:
This is a licence check mechanism is one possible way 
to keep track of users logged into a central
database. It made me always nervous to know that the
customers *maybe* know of the unlimited access to net
ressources and will only pay for a single user suite
even if they are using it over the net.

The max. number of logins is controlled throug a global 
constant defined in Modul1. This can be easily adapted 
to any need (maybe to place it in another hidden table, 
or module). So you even can patch it during runtime,
f.e. to screw it up via secret code mechanism.

If your customers are too smart, than you can also put
some CRC checks round the entries in USysInfo, so you
can make it realy hard to break.

The method is implemented working under Windows and NT 
without any change. The problem to find out the local 
machine name, is solved by passing the 16 to 32 bit 
generic thunk layer and using normal Win32 functions.

It can be used in any MS-Access project which
will be used in network environments using WFW 3.1x
or NT. This approach should work with Novell clients,
too, but is not tested.

Sample usage:
-------------
 * Copy all files from this archive into one directory.

 * Move the DLL files to your WINDOWS\SYSTEM directory

 * Register the 'AOCX' OLE control with 
   REGSVR AOCX.OCX within the install dir.

 * Open the file LICENCE.MDB and delete the bound table
   'USysInfo' 
NOTE:
   You have to switch the view settings view/options/common/
   show system objects to true. Otherwise all USysXX objects
   will be hidden.

 * Bind it to the new path.

 * Repeat the steps above, for more workstations in net
   and bind 'USysInfo' to the remote location of the first
   station.

 * You can modify the global const gnMaxLogins = 5 to any
   value to perform your tests with.

 * ...starting the sample form 'Mainform' which simply 
   loads form 'USysStrt' which keeps track of the entries
   in 'USysInfo', showing some infos.

Own usage:
----------
* Copy and register like described above.

* Then copy and paste (or export) form 'USysStrt' to your 
  application.

* Do the same with Modul1

* In your 'Mainform' which will be loaded at startup you
  should add following lines:

 Sub Form_Load ()
    DoCmd OpenForm "USysStrt"
    If gStartExceed Then DoCmd Close A_FORM, CStr(Me.name)
 End Sub

...and:
 Sub Form_Unload (Cancel As Integer)
    DecSession CurrentUser(), gszComputer
    DoCmd Application.Quit
 End Sub

* This methode allows you, to open even more sessions on
  one machine and it will be still only one active logon  
  entry in 'USysInfo' table for this machine.

Files:
------
	ABSTRACT.TXT	this file
	LICENCE.MDB	sample usage database. Do above steps
			in *Sample usage* and start 'Mainform'..
	LICEN_DB.MDB	holds table 'USysInfo' which should
			be placed in the central .MDB and bound 
			to each application.MDB.
	AOCX.OCX	the OLE control providing the interface 
			to some API calls that cannot be done
			under 16 Bit Windows.
	REGSVR.EXE	For register and unregister AOCX.OCX
	WOWGLUE.DLL	Original from J. Richter
	WOWTHUNK.DLL	...my "two Cents" for using 32 Bit API
			functions in a 16 Bit app under NT WOW
	OC25.DLL	The foo stuff which we need just to do
			OCXes.

If you find the method I implemented of value for you and you use it, 
then please keep in mind that it is shareware.
The registration fee is 9 $US. If you register, you get the full sources
of the DLLs and of the OLE custom control.

Please contact me via CompuServe: R.Schott ID 100112,2122
Suggestions are also wellcome.

Future plans:
-------------
A clean DLL solution which will be optimized for size and speed and
won't use a special table but will use some kind of network broadcast.

Other product:
--------------
Superstrip: A tool which dramatical reduces size of MS-Access Basic
            code and therefore the load time.