All pastes #985343 Raw Edit

for 7

public text v1 · immutable
·published 2008-04-14 22:54 UTC
rendered paste body
Public Shared Function GetPreActivationCode(ByVal licenseUserLastName As String) As String
    Dim num As Integer
    Dim machineName As String = Environment.MachineName
    Dim num2 As Integer = 0
    num = 0
    Do While (num <= (machineName.Length - 1))
        num2 = (num2 + (Strings.Asc(machineName.Substring(num, 1)) * &H209))
        num += 1
    Loop
    num = 0
    Do While (num <= (licenseUserLastName.Length - 1))
        num2 = (num2 + (Strings.Asc(licenseUserLastName.Substring(num, 1)) * &H25F))
        num += 1
    Loop
    Return num2.ToString("00000000")
End Function