Jump to content

Com Error - Class Not Registered

Recommended Posts


I have an odd problem so here goes.

I have a 32bit DLL that is used to generate a number based on a supplied string and number.

The code to use the DLL file is below:

Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")
Local $oAMS = ObjCreate("AMSR.GenStr")
Local $sOutput = $oAMS.GenerateString(GuiCtrlRead($cmb_App),GUICtrlRead($input_ID),"useless string goes here")

Func _ErrFunc($oError)
    ; Do anything here.
    MsgBox(0,"COM ERROR: AMMS Registration Tool v1.0","Error Number: " & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            "Help Context: " & @TAB & $oError.helpcontext & @CRLF & _
            "Last DLL Error: " & @TAB & $oError.lastdllerror & @CRLF & _
            "Line Number: " & @TAB & $oError.scriptline & @CRLF & _
            "Return Code: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & _
            "Description:" & @TAB & $oError.windescription)

OK, so I can register the required DLL on a 32 bit WIndows XP OS, compile it the Autoit above to (EXE1) and then run it successfully. No problem.

If I take EXE1 onto a Win7-64 machine, register the 32bit DLL using regsvr32 from SysWOW64 then EXE1, runs no problems.

If I compile exactly the same code on the Win7-64 machine as either 32bit or 64bit (EXE2) it fails to run with Description "Class Not Registered".

Any help greatly appreciated.  It's got me stumped.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now