Please login or register.

Login with username, password and session length

Author Topic: Active Home SDK / Vista / Visual Studio 2008  (Read 17839 times)

fischb22

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 17
Active Home SDK / Vista / Visual Studio 2008
« on: February 10, 2009, 06:25:44 PM »

Greetings, i recently purchased a x10 active home starter kit,

i have visual studio 2008, but when ever i go to add a control to the page, it says "Failed to import ActiveX Control ....."

I did install the Active Home SDK, and i also manually tried registering the DLLs.

anyone have a solution for this prblem?

Logged

originalevil

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 52
  • We could do some watercolors together. You and I.
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #1 on: February 10, 2009, 08:01:07 PM »

Did you add a reference for AHSCRIPT.DLL to your project?
Logged

fischb22

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 17
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #2 on: February 10, 2009, 08:02:53 PM »

yes
Logged

originalevil

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 52
  • We could do some watercolors together. You and I.
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #3 on: February 11, 2009, 01:01:25 AM »


Check to see if you have any references to it in the registry. I would start here, which is where VS stores information about COM objects referenced.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ComponentPickerPages

If it isn't there, then the reference wasn't written, which could be a permissions issue. I can give you some tips for that.

If it is there, I need to do more research.
Logged

dextor

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #4 on: February 11, 2009, 06:56:02 AM »

maybe you use only the libraray without the control, i have made with tihs the best compatibility (btw, the control under vista often makes vb to shut down and so on)


I only have the code for vb6, but i think this should work for vb.net


Imports ActiveHomeScriptLib
Imports System
Imports System.Drawing
Imports System.Drawing.Imaging

Dim WithEvents ActiveHomeObj As ActiveHomeScriptLib.ActiveHome
Dim ActiveHomeTraffic
Dim AHEvents As String

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ActiveHomeObj = New ActiveHome
    End Sub


    'This is an X10 traffic event handler for the receive action
    Sub ActiveHomeTrafficAction(ByVal bszRecv As Object _
                            , ByVal vParm1 As Object _
                            , ByVal vParm2 As Object _
                            , ByVal vParm3 As Object _
                            , ByVal vParm4 As Object _
                            , ByVal vParm5 As Object _
                            , ByVal vReserved As Object) Handles ActiveHomeObj.RecvAction

        ActiveHomeTraffic = (bszRecv & " " & vParm1 & " " & vParm2 & " " & vParm3 & " " & vParm4 & " " & vParm5)
        AHEvents = DateString & " - " & TimeString & " - " & bszRecv & " - " & vParm1 & " - " & vParm2
        AHEvents = AHEvents & vbCrLf
        TextBox1.AppendText(AHEvents)

    End Sub



cyaz
Dextor
Logged

fischb22

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 17
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #5 on: February 11, 2009, 11:45:26 AM »

using your example i get this


Error   1   Failed to create the wrapper assembly for type library "AxActiveHomeScriptLib". Parameter 'bstrParam' of method 'SendAction' has a specified default value that is not of a type (System.Object) recognized by the ActiveX Importer.  Change the type of the parameter to a known OLE automation compatible type.   C:\Users\brian\Documents\Visual Studio 2008\Projects\Home Controller\Home Controller\AxActiveHomeScriptLib   Home Controller


 >*<

Logged

fischb22

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 17
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #6 on: February 11, 2009, 11:50:08 AM »

okay, i went back to the project properties, and deleted all the crap references i was playing with, the error went away.
 :'
Logged

EL34

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 278
    • My X-10 projects
Re: Active Home SDK / Vista / Visual Studio 2008
« Reply #7 on: March 10, 2009, 06:40:24 AM »

Here's a screen shot of the references I use on all my VBExpress projects
also look over to the right in the references, it may be off the screen



« Last Edit: March 10, 2009, 06:43:13 AM by EL34 »
Logged
W10 - CM15A - AHP 3.301 - i Witness - MyHouse online - Smart Macros - SDK using Visual Basic express 2008
My X10 page-> http://www.el34world.com/Misc/home/X10_0.htm
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.