Hi, I'm currently using VB 6.0 and have a DLL that I've referenced and am trying to call a function for. Whenever I try to run the program though, I'm getting "
"ActiveX component can't create object"
on this line:
strEncPass = x.EncryptPass(ENC_MYPASS, ErrMsg)
And here is the entire code:
'On Error GoTo Hell
'declare an instance of the CCPass exposing the Pass module within it
Dim x As New CCPass.Pass
Dim strEncPass As String
Dim blValid As Boolean
Const ENC_MYPASS = "MyPassword" 'if less than 8 characters, encryption will fail
Const TST_MYPASS = "MyPassword" 'change this from ENC_MYPASS to test that it fails
'call the encrypt function to encrypt password...returned into strEncPass if ok
strEncPass = x.EncryptPass(ENC_MYPASS, ErrMsg) 'any errors returned into ErrMsg
If Trim(ErrMsg) <> "" Then 'check if there is an error
MsgBox "Error=" & ErrMsg, vbCritical, App.Title
MsgBox "Encrypted Password=" & strEncPass, vbInformation, App.Title
'lets now verify that the encrypted password decrypts back to the original
blValid = x.VerifyPass(TST_MYPASS, strEncPass, ErrMsg)
If blValid = True Then 'yay!
MsgBox "Password is Good", vbExclamation, App.Title
MsgBox "Password Bad", vbCritical, App.Title
MsgBox "There was an error dammit!"
Any input would be greatly appreciated. Thank you.