X10 Community Forum
🖥️ActiveHome Pro => SDK => Topic started by: fischb22 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?
-
Did you add a reference for AHSCRIPT.DLL to your project?
-
yes
-
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.
-
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
-
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
>*<
-
okay, i went back to the project properties, and deleted all the crap references i was playing with, the error went away.
:'
-
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
(http://www.el34world.com/Misc/VB/images/x10references.png)