Solution: 64-bit OS and Activehome dll not loading properly

Discussion and support for individual OSA plugins
Post Reply
Message
Author
User avatar
kherron
Posts: 639
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Solution: 64-bit OS and Activehome dll not loading properly

#1 Post by kherron » Fri Dec 23, 2011 9:15 pm

As discussed in my other thread http://www.opensourceautomation.com/php ... ?f=4&t=285 there is defiantly an issue with the X-10 ActiveHome SDK dll's loading correctly on a 64-bit machine. So any Plugins designed to use or that references the X-10 AHSDK will require some additional work before the plugins will work on a 64-bit machine. (Tested on Win 7 Pro 64-bit)

Instead of posting this under my other post, I thought I would post it in a new thread so it would be easier for others to find.

If you keep getting this error in your plugin log CM15A or CM11A:
Retrieving the COM class factory for component with CLSID {001000AF-2DEF-0208-10B6-DC5BA692C858} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))


Here is what you will need to do.
  • 1. Copy C:\Program Files(x86)\AHSDK\bin\ahscript.dll to another folder outside of the "Windows" directory such as C:\my_dll\ahscript.dll

    2. Now we need to add the COM+ Components using Component Services of Microsoft.
    To start Component Services, click on start, and type "Component Services" in the Search Box.
    Now click on Component Services under "Programs".

    3. Once component Services opens, under "Console Root", click on "Component Services"

    4. click on Computers, then My Computer, then COM+ Applications.

    5. Then right-click on "COM+ Applications" and choose "New" -> "Application".

    6. At "Welcome to the COM Application Install Wizard" screen, click “Next >”.

    7. Click on “Create an Empty Application” button.

    8. Enter the dll name. Since the DLL name is "ahscript.dll" type in the name as “ahscript” (without the.dll). When asked "Library or Server", select “Server”.

    9. Click “Next >” button and then choose “This User”.

    10. Enter the Password for this user. (It's best if the user is an administrator)

    11. Now “Add Application Roles” screen will appear. Do not add anything just click on the “Next >” button.

    12. Now “Add Users to Role” screen appear. Do not add anything just click on the “Next >” button.

    13. Click Finish.

    14. Now you will see that under the "Console Root -> Component Services -> Computers -> My Computer -> COM+ Application -> you will see the newly added application. In this example the application name would be "ahscript". Click on "ahscript" to expand it.

    15. Now right-click on “Components” and then choose “New Component”. At "Welcome to the COM Application Install Wizard" screen, click “Next >”.

    16. Click on “Install new component(s)” and now select the DLL which you want to register. In this case it would be “C:\My_DLL\ahscript.dll”.

    17. Once you select the DLL you will see that it will show you the components found. Click on the “Next >” button to proceed and finally hit the “Finish” button to complete.
Now, you can launch OSAE Manager, and check your logs. They should be error free, and your CM15A or CM11A show work perfectly on your 64-bit computer. No virtual PC needed!

Hope this helps anyone with this same issue!!!


Kirk

Milenko
Posts: 94
Joined: Sun Jan 16, 2011 10:09 am

Re: Solution: 64-bit OS and Activehome dll not loading prope

#2 Post by Milenko » Fri Dec 23, 2011 9:22 pm

Wow, I'm on 32-bit so I haven't had this problem but I've gotta say great job tracking down a fix for this!!! Nice work man!

User avatar
kherron
Posts: 639
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: Solution: 64-bit OS and Activehome dll not loading prope

#3 Post by kherron » Fri Dec 23, 2011 9:31 pm

Thanks,

Took all day, but I'm now ahead of the game!!!! :lol:

AlexSG
Posts: 47
Joined: Sat Dec 03, 2011 7:18 pm

Re: Solution: 64-bit OS and Activehome dll not loading prope

#4 Post by AlexSG » Fri Dec 23, 2011 9:51 pm

Man, look like you may need a couple of days to un-knot your brain. Nice work.

JBmiggs
Posts: 16
Joined: Sat Feb 09, 2013 9:19 am

Re: Solution: 64-bit OS and Activehome dll not loading prope

#5 Post by JBmiggs » Sat Mar 02, 2013 9:28 am

Hi kherron,

I hope your still around because I am having this same issue that you had in your previous post, I have done these instructions above and still cannot get the plugin to start or give me a log. After a fresh load of OSA 64bit and adding the CM15A plugin on Win7 64bit I am getting this error below which is the same as you had in viewtopic.php?f=4&t=285:

###############
Error activating plugin (CM15A): Could not load file or assembly 'file:///C:\OSA\AddIns\CM15A\OSAE.CM15A.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. -
###############

OSAE Service.log
###############
plugin name: CM15A
12/13/2011 12:10:49.973 PM - Testing connection
12/13/2011 12:10:49.980 PM - setting found: CM15A - 1
12/13/2011 12:10:50.509 PM - status: False
12/13/2011 12:10:50.511 PM - PluginName: CM15A
12/13/2011 12:10:50.513 PM - PluginVersion: 0.3.0
###############

Status is showing false.

I saw in your next post that to be able to get a log and stuff you had to recompile the OSAE.cm15A.dll to work with your system. Do you have instructions for doing that or a copy of the file. I know this needs to be done before the instructions above will work.

Thanks
Joe

dj-eon
Posts: 87
Joined: Wed Jul 13, 2011 4:03 am
Location: UK

Re: Solution: 64-bit OS and Activehome dll not loading prope

#6 Post by dj-eon » Wed Jun 03, 2015 11:42 am

I know this is an old thread, but I'd like to thank you for this information.

I've recently installed OSA 0.4.5 on Windows 7 x64 and could not get my CM15 working at all (even though it worked fine in Active Home Pro on the same machine)
It looks like you have saved me from having to ditch my x10 gear for a while longer.

Thanks again.

(PS, just got to figure out my z-wave interface now haha)

Post Reply