home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / FERRAMEN / LK_API_1 / README.TXT < prev   
Encoding:
Text File  |  1993-04-30  |  8.9 KB  |  253 lines

  1. ----------------------------------------------------------------------
  2.                                  LOCKER API DLL v1.00 Demo 
  3.  
  4.   Thank you for Trying LOCKER API DLL v1.00 WINDOWS. Please
  5.   notify us if you encounter any problems with LOCKER API. 
  6.  
  7.   You are allowed to use this DEMO of LOCKER API for 30 days. After 30 days
  8.   you should either purchase LOCKER API or STOP USING the DEMO.
  9.  
  10.   This demo is for EVALUATION PURPOSES ONLY
  11.  
  12.   You are allowed to give/distribute this demo to anyone ONLY IF it
  13.   has not been modified,is given with this documentation,is not bundled
  14.   with comercial software and is FREE.
  15.  
  16.   We are interested in what you think about LOCKER API
  17.   what additional feature you would like to see, what you don't like about it,
  18.   and what you do like about it. Depending on what feedback I
  19.   receive, additional features may be added !
  20.  
  21. ----------------------------------------------------------------------
  22. Description:
  23.  
  24.      LOCKER API controls allows a programmer to control the number of
  25.      concurrent users that may access their windows program.
  26.  
  27.      When someone tries to access the program when maximum
  28.      number is being used, the program is notified and it is up to
  29.      the program as to what happens -  whether the program waits for
  30.      a free license, exits, justs notifies that the software license is
  31.      being exceeded, etc.
  32. ----------------------------------------------------------------------
  33. Instructions for using LOCKER API DLL v1.00 DEMO
  34.  
  35. FILES LIST
  36.   readme.txt :  This file
  37.   LOCKAPIW.DLL: Metering DLL - This should go into your windows
  38.                 directory (or program directory)
  39.   LOCKAPIW.LIB: Lib file for C programs
  40.   LOCKAPIW.H:   Include for C programs
  41.   LOCKAPIW.DAT: Datafile used by DLL. Can be renamed.
  42.  
  43. FUNCTIONS:
  44.  
  45. LONG FAR PASCAL LOCKAPIW(WORD COMMAND,LPSTR LOCKERFILE,WORD MAX_LICENSE,DWORD FAR
  46. *LOCKERDATA);
  47.  
  48. Description of Parameters:
  49. COMMAND     - used to tell LOCKAPI what it should do
  50. LOCKERFILE  - Complete path to where the LOCKAPIW.DAT file resides
  51. MAX_LICENSE -# of concurrent users to allow 
  52. LOCKERDATA  -storage for data the LOCKAPIW needs. Must not be modified or changed.
  53.  
  54.  
  55. WORD is the same as ainteger
  56. LPSTR is the same as a character far pointer
  57. DWORD is the same as a long
  58.  
  59. LAN COMMANDS: 
  60.  
  61. This commands should be used for network version of your software. If
  62. the software is installed on a local drive - the user will be unable
  63. to run it unless share is loaded. 
  64.  
  65.    Command:       Value:  Description
  66.    --------------------------------------------------------------------
  67.    LKAPI_INIT_LAN      0  This initializes a metering session on a
  68.                           network. Must be called before any other 
  69.                           metering commands.
  70.  
  71.                           Returns 0 if ok, -1 if an error occurred
  72.                           
  73.    LKAPI_DEINIT_LAN     1  This deinitializes a metering session.
  74.                           Returns 0 if ok, -1 if an error occurred
  75.  
  76.    LKAPI_METER_LAN     2  This sees if any licenses are available
  77.                           and meters one if possible
  78.  
  79.                           Returns 0 if ok, -1 if no licenses are
  80.                           available 
  81.  
  82.    LKAPI_FREE_LAN      3  This frees up a metered license
  83.                           Returns 0 if ok, -1 if an error occurred
  84.  
  85.    LKAPI_STATUS_LAN    4  This returns the # of active licenses
  86.  
  87.                           Returns # of active licenses if ok,
  88.                           -1 if an error occurred
  89.  
  90.    a RETURN value of -99 indicates that an invalid command was used
  91.  
  92. SINGLE COMMANDS: 
  93.  
  94. This commands should be used for standalone versions of your software. If
  95. the software is installed on a local drive - the user will be able to
  96. run it normally. However if it is installed on a network - only one
  97. user will be able to run it.
  98.  
  99.    Command:       Value:  Description
  100.    --------------------------------------------------------------------
  101.  
  102.    LKAPI_INIT_S       10  This initializes a metering session on a
  103.                           network. Must be called before any other 
  104.                           metering commands.
  105.  
  106.                           Returns 0 if ok, -1 if an error occurred
  107.  
  108.    LKAPI_DEINIT_S      11  This deinitializes a metering session.
  109.  
  110.                           Returns 0 if ok, -1 if an error occurred
  111.  
  112.    LKAPI_METER_S      12  This sees if any licenses are available
  113.                           and meters one if possible
  114.  
  115.                           Returns 0 if ok, -1 if no licenses are
  116.                           available 
  117.  
  118.    LKAPI_FREE_S       13  This frees up a metered license
  119.  
  120.                           Returns 0 if ok, -1 if an error occurred
  121.  
  122.    LKAPI_STATUS_S     14  This returns the # of active licenses.
  123.  
  124.                           Returns 0 if the software is installed on a local drive and
  125.                           share is not loaded or the # of active
  126.                           licenses, -1 if an error occured.
  127.  
  128.    a RETURN value of -99 indicates that an invalid command was used
  129.  
  130.  
  131. LANGUAGE SPECIFIC:
  132. ----------------------------------------------------------------------
  133. C :
  134. You should include the header file:
  135.   "lockapiw.h"
  136.  
  137. and have either a global or a static variable for the LOCKERDATA.
  138.  
  139. The LOCKAPIW.LIB either needs to be linked in or you can add an 
  140. IMPORTS statement in your DEF file 
  141.  
  142. IMPORTS LOCKERAPIW=LOCKERAPIW.LOCKERAPIW
  143.  
  144. Example calls:
  145.  
  146.     LOCKAPIW(LKAPI_INIT_LAN,tempstr,1, &LOCKKEY);
  147.     if (-1L==LOCKAPIW(LKAPI_METER_LAN,tempstr,1, &LOCKKEY))
  148.       {
  149.       // no free licenses are available
  150.  
  151.       }
  152.  
  153.  
  154. ----------------------------------------------------------------------
  155. Visual Basic
  156.  
  157. to GLOBAL.BAS add the following lines:
  158.  
  159. Declare Function LOCKAPIW Lib "LOCKAPIW.DLL" (ByVal lkcom%, ByVal lkfile$, ByVal lkcount%, LKFLAG&) As Integer 
  160. Global LKFLAG As Long
  161.  
  162.  
  163. to initialize LOCKAPI use something like the following:
  164.  
  165. LKFLAG& = 0
  166. LKstr$ = "D:\LOCKAPIW\TEST.DAT"
  167. status = LOCKAPIW(10, LKstr$, 2, LKFLAG&)
  168.  
  169.  
  170. to meter a license:
  171.  
  172. status = LOCKAPIW(12, LKstr$, 2, LKFLAG&)
  173. ----------------------------------------------------------------------
  174.  
  175. Other Languages:
  176.  
  177. Lookup the instructions on how to access functions in DLLs
  178.  
  179. (and then let us know so we can include the information in future
  180. releases)
  181. ----------------------------------------------------------------------
  182.  
  183. COMMON ERRORS:
  184.  
  185. You get an error initializing or metering. Most likely the problem is
  186. that the filename you are passing is invalid, or is being passed
  187. wrong. The path given for the LOCKERFILE  (LOCKAPIW.DAT) must be a
  188. valid DOS path - not a network specific path.
  189.  
  190. FOR example:
  191.  
  192.   F:\METER\LOCKAPI.DAT   is will work - where F: is a mapped network
  193.               drive
  194.  
  195.   SERVER1/SYS:\METER\LOCKAPI.DAT will NOT work (even though NOVELL
  196.               under stands it)
  197.  
  198.  
  199. USE IDEAS: 
  200.  
  201. You can store the license limit in a file and read it in before
  202. calling LOCKAPIW. This way you can easily upgrade a customers site
  203. for more licenses by just sending out a new file. It would be
  204. best to encyrpt the data (so they can't hack the license limits)
  205.  
  206.  
  207. ----------------------------------------------------------------------
  208. The following licenses for LOCKER API DLL v1.00 are available:
  209.  
  210.    LOCKER API DLL v1.00: USD $ 245 + $5 royalty for each single license of
  211.                         software sold    (S/H included) for the US & CANADA
  212.  
  213.    In Massachusetts please add 5% Sales Tax.
  214.  
  215. We also offer  Royalty free Application Licenses. Please contact us for
  216. a quote.
  217.  
  218.  
  219. We accept CHECKS, MONEY ORDERS, and Company PO's (call for approval)
  220.    
  221. If you want more information on LOCKER API DLL or if you would like to purchase 
  222. LOCKER API DLL v1.00 we can be contacted at:
  223.  
  224.                HAMPSHIRE SOFTWARE
  225.                            Box 216 
  226.                            300 Washington Street
  227.                            North Pembroke, MA 02358
  228.  
  229.                            (800)-NET-SOFT
  230.  
  231.                Compuserve Address: 72607, 3042
  232.  
  233.   Dealer / Reseller inquires welcomed.
  234.  
  235.  
  236. And NOW for the usual disclaimers:
  237.  
  238. NO OTHER WARRANTIES. HAMPSHIRE SOFTWARE disclaims all other warranties, either express
  239. or implied, including but not limited to implied warranties of mechantability and
  240. fitness for a particular purpose, with respect to the software, the accompanying
  241. written materials, and any accompanying hardware. This limited warranty gives
  242. you specific legal rights. You may have others, which vary from state to state.
  243.  
  244. NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall  HAMPSHIRE SOFTWARE
  245. or its suppliers be liable for any damages whatsoever caused by the use of or
  246. inability to use this HAMPSHIRE SOFTWARE product. Because some states do not
  247. allow the exclusion or limitation of liability for consequential of incidental
  248. damages, the above limitation may not apply to you.
  249.  
  250. ----------------------------------------------------------------------
  251.  
  252.  
  253.