Visual Basic 6.0
I have problem when running the application written in VB6 in certain PC. Runtime error 5 - Invalid Procedure or Argument call.
The code as below:
passval = "123456"
chrpass = ""
for i = 1 to 6
chrpass = chrpass + chr(asc(passval,i,1))
next
stringpass = "xxxxxx..." ' 80 character in this stringpass
len_str = len(stringpass)
int_mod = Modulus(len_str, 6)
chrtoread = 1
X = 1
For cycle = 1 To Int(len_str / 6)
For intbyte = 1 To 6
sal_read = Ebcdic(Mid(stringpass, chrtoread, 1)) '-->user-defined function, no error
pw_read = Asc(Mid(chrpass, intbyte, 1)) '-->suspect error occurred here
EOr_Read = Int(sal_read) Xor Int(pw_read)
EOrPass = EOrPass + Chr(EOr_Read)
chrtoread = chrtoread + 1
Next
Next
Any idea to solve this??
|