Tom Hayes
thayes at mail.com
Sat Jan 22 11:17:46 CST 2005
To introduce- My name is Tom Hayes - I run a small IT business in the west of Ireland - Galway to be precise. Land of milk and guinness! I build solutions using MS Access - I have been training and working with the app. for six years. I want to prevent some of my generic solutions being copied and used without my knowledge. The ideal solution for me is a way to identify the unique computer number (i think this is reffered to as the host id) and set this as a constant in a module in each individual database (mde). Each time the database is opened the computers unique id will be referenced by the database and either open or lock depending on comparison. Background: due to the nauture of the solution - I will configure each database to each cpu and that is then delivered to site. If there is a problem a complete new system ie hardware/ software is removed and returned. There will be no ligitimate reason why the software should be used on a different terminal. I have used code in the past to retrieve Usernames into an access solution; Option Compare Database Option Explicit Declare Function GetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) _ As Long Public Function fntUsername() As String Dim s As String Dim cnt As Long Dim dl As Long Dim CurUser As String cnt = 199 s = String$(200, 0) dl = GetUserName(s, cnt) If dl <> 0 Then CurUser = Left$(s, cnt) Else CurUser = "" fntUsername = CurUser End Function Can you help or offer an alternative? reagrds Tom Business Development Manager HayesMinton Ltd -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm