home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / seriz10.zip / SERIALIZ.BI < prev    next >
Text File  |  1994-01-18  |  3KB  |  63 lines

  1. DEFINT A-Z
  2. DECLARE SUB CalcRegNum (UName$, Serial$, RegNum$, NoReg%)
  3. DECLARE SUB GetRegInfo (UName$, Serial$, RegNum$, TrapSpec$)
  4. DECLARE SUB PutRegNo (TrapSpec$)
  5.  
  6. ' CalcRegNum      NoReg%    This routine is used to calculate and validate
  7. '                           the registration information.  If it calculates
  8. '                           correctly, the NoReg% variable is returned as
  9. '                           FALSE (0), otherwise it's return as TRUE (-1).
  10. '                           This routine expects 3 variables and returns 1.
  11. '                   
  12. '                           UName$   - This string will hold the registered
  13. '                           name as indicated on the registration letter
  14. '                           sent to each user.
  15. '                   
  16. '                           Serial$  - This string is the trimmed version
  17. '                           of the 8 digit serial number, which contains
  18. '                           leading zeros.
  19. '                   
  20. '                           RegNum$  - This is the calculated registration
  21. '                           number.  It is compared against the one from
  22. '                           the registration letter which is generated by
  23. '                           the DIZREG.BAS program.
  24. '                   
  25. '                           NoReg%   - This integer variable has two
  26. '                           purposes.  But, in this routine it is returned
  27. '                           if the calculation is sucessful as 0 or -1 if
  28. '                           it fails.
  29. '                         
  30. '
  31. ' GetRegInfo      UName$    This routine will check the executable for the
  32. '                 Serial$   registration info.  It takes one variable, but
  33. '                 RegNum$   returns 3.
  34. '                   
  35. '                           UName$   - This string holds the user name
  36. '                           shown on the registration letter.
  37. '                   
  38. '                           Serial$  - This is the 8 digit trimmed serial
  39. '                           number shown on the registration letter.
  40. '                   
  41. '                           RegNum$  - This is the 8 digit trimmed
  42. '                           registration number found on the registration
  43. '                           letter.
  44. '
  45. '                           TrapSpec$- This is the location of EXE file
  46. '                           which is storing all the Information.
  47. '
  48. ' PutRegNo        NONE      This routine will place the registration info
  49. '                           at the end of the executable file.  It takes
  50. '                           one parameters, but doens't return any.
  51. '
  52. '                           TrapSpec$- This is the location of EXE file
  53. '                           which is storing all the Information.
  54.  
  55. TYPE RegistrationInfo
  56.      UserName AS STRING * 32
  57.      SerNum AS STRING * 8
  58.      RegCode AS STRING * 8
  59. END TYPE
  60.  
  61. DIM SHARED RegInf AS RegistrationInfo
  62.  
  63.