Hello, TYRPASSWD is a component for Delphi that let you manage user's names and passwords to protect your programs. This is an new version of the file 'yrpasswd.zip' I've submited to your library a month ago. You can get the new version (1.60) of the zip file 'YRPASSWD.ZIP' at the following URL : http://masg1.epfl.ch/rose.mosaic/rochat_data/delphi.html WHAT'S NEW : ---------- 1) The encryption method has been slightly improved. 2) An about box has been add in the main form of the Login Dialog. It gives you useful information about Memory, Number of running tasks, Windows and Dos Version, etc. 3) Add the possibility to define a level of priority to each user (from 1 (lowest priority) to 9 (highest priority) ). 4) You have now the possibility to know who is logs in and which is his priority level. 5) You can choose the name of the .INI file and the name of the section where you want to keep information about users. If you change the default values ('PASSWORD.INI' and 'Users') you must put the following lines in the .INI file you choose : [The name you choose for this section] <------ [Users] originally sysop=3GssdU*wS <------ The user name and its associated encrypted password (corresponding to password 'password'). You will be able to change these settings. 6) The TYRPasswd has been improved to let you test at design time the login dialog. HOW TO USE the PASSWORD.DLL ant the TYRPasswd component : ------------------------------------------------------- 1) Put the files PASSWORD.DLL and PASSWORD.INI in the directory of your application (or in the windows/system directory if you want to protect several applications with the same password). 2) Read the notice below and follow the instructions {------------------------------------------------------------------------------} { Copyright : © Copyright 1995 by Y. Rochat } { Creation Date : 25/10/1995 } { Last Update : 28/11/1995 } { Version Number : 1.60 } { Programation Language : DELPHI 1.01 } {------------------------------------------------------------------------------} { PASSWORD.DLL V. 1.60 : A Windows DLL that let you manage user's name and } { password in order to protect your programs. This } { DLL, which is FREEWARE ( © Copyright 1995 by Yves } { Rochat ), implements one function : } { } { MotDePasse(var UserN : String ; var PriorityL : Integer ; } { IniFileName,SectionName : String) : WordBool ; } { } { IniFileName : The name of the .INI file which keeps the list of users names } { and their associated encrypted passwords. If you don't add a } { path to this name, we suppose that it is in the same directory} { as the file PASSWORD.DLL . By default 'PASSWORD.INI' } { SectionName : The name (without brakets) of the section in IniFileName which} { contains the information about users and passwords. By default} { Users. } { } { If you succeed to login in the program, UserN and PriorityL will contain } { respectively the name of the user who logs in and it's associated priority } { level. Priority is a number which can varies between 1 (lowest priority) to } { 9 (highest priority). } { } { Author : Yves ROCHAT } { Email : rochat@dma.epfl.ch } { Address : Ch. de la Clergère 36 } { CH-1009 PULLY (Vaud) } { SWITZERLAND } {------------------------------------------------------------------------------} { TYRPasswd Version 1.6 : A Freeware component that let you use PASSWORD.DLL } { You MUST install it in your component palette before} { using it. It will be on the palette named 'YRPasswd'} { } { HOW TO USE IT : 1) Put a TYRPasswd (by ex. MyPswd) in you Delphi form } { 2) Do the following in the procedure FormCreate : } { } { procedure TForm1.FormCreate(Sender: TObject); } { begin } { If not Mypswd.GetPassword then } { Begin } { If not Mypswd.ExistDll } { then MessageDlg('File PASSWORD.DLL is missing' + #13#10 + #13#10 + } { 'You are not authorized to use this program !', } { mtInformation,[mbOk], 0) } { else MessageDlg('BAD PASSWORD....', mtInformation,[mbOk], 0); } { Application.Terminate ; } { End else } { MessageDlg('GOOD PASSWORD....', mtInformation,[mbOk], 0); } { end; } { } { procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); } { begin } { if MessageDlg('Close application ?', mtConfirmation, } { [mbYes, mbNo], 0) = mrYes then } { begin } { Action := caFree ; } { Mypswd.FreeDllPassword ; <---- TO FREE MEMORY ALLOCATED FOR PASSWORD.DLL } { end } { else } { Action := caNone; } { end; } { } { Properties of the component } { --------------------------- } { } { ExistDll : True if PASSWORD.DLL exists, false otherwise } { LoadedDll : True if PASSWORD.DLL is loaded, false otherwise } { OkLogin : Set it to True to test the Login Dialog at design time } { Set it to False to unload PASSWORD.DLL from memory } { ALWAYS SET IT TO FALSE BEFORE CLOSING A PROJECT WHICH } { CONTAINS A TYRPASSWD COMPONENT } { UserName : Name of the user who logs in } { UserLevel : Priority level of the user who logs in } { IniName : Name of the .INI file which contains users information } { SectionName : Name of the Section in the file IniName } { } {------------------------------------------------------------------------------} { IMPORTANT } { } { You can use this code as is and you are FREE to copy/distribute it provided } { that this notice is not modified and included in the distrubution pack. } { I'll be more than happy to hear from you for your comments about a real-life } { use of this code. Please send your comments to " rochat@dma.epfl.ch " with } { subject field starting with the words 'TYRPASSWD'. } {------------------------------------------------------------------------------} {:DISCLAIMER: } {------------ } { THIS SOURCE CODE IS DELIVERED AS IS. THERE IS NO REASON TO THINK THAT IT } { SHOULD NOT WORK AS CLAIMED. BUT JUST IN CASE, LET ME DISCLAIM THAT YVES } { ROCHAT CAN NOT BE HELD LIABLE IF YOU LOOSE TIME OR MONEY USING THIS CODE. } {------------------------------------------------------------------------------} 3) Compile your application ------- NOTES : ------- a) A demo program is contained in this zip file b) If the file PASSWORD.DLL doesn't exist, your application will not start c) If the section 'SectionName' in the .INI file 'IniFileName' (PASSWORD.INI by default), which contains the encrypted list of authorized users of your application, is deleted or doesn't exist, only a MASTER PASSWORD encrypted in the DLL will let you start your application. To try this demo, enter : 'sysop' as username and 'password' as password. You can modify these settings when you are log in. d) You should be able to use this DLL in C or others languages If you are interested in the SOURCE CODE of the DLL, let me know. But, as I devoted some time to create my password DLL, I do not want to give my source code for FREE. So, if you like this DLL and you use it in your programs, please register by sending 10$ to : Yves Rochat Ch. de la Clergere 36 1009 PULLY (Vd) Switzerland As soon as I will receive the money, I will send you the source code by Email. Tanks for your interest Have a nice day Yves Rochat ------------------------------------------------------------------------------- ____/ __ / ____/ / Yves ROCHAT / / / / / Swiss Federal Institute of Technology ____/ ____/ ____/ / DMA-ROSE Ecublens / / / / CH-1015 Lausanne (Switzerland) _____/ _/ _/ _____/ Phone : xx41 21 693 25 66 E-mail : rochat@dma.epfl.ch FAX : xx41 21 693 42 50 WWW : http://masg1.epfl.ch/rose.mosaic/rochat.html -------------------------------------------------------------------------------