Referenced DLL giving error: Can't create object.

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:
Sub TestCCPass()

'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
End
End If
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
Else 'boo!
MsgBox "Password Bad", vbCritical, App.Title
End If
End

Exit Sub
Hell:
MsgBox "There was an error dammit!"
End

End Sub

Any input would be greatly appreciated. Thank you.

Comments

  • All I can think of is that the Pass object can not be created. Perhaps you need to call the function of another class to get a Pass clas created. You should check how to use the components in the documentation that goes with it.

    Best Regards,
    Richard

  • :
    Was this dll registered on your machine?
  • : Was this dll registered on your machine?

    And has it been recompiled without binary compatibility since it was referenced?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories