Please login or register.

Login with username, password and session length

Author Topic: Windows 7 and SDK  (Read 17828 times)

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Windows 7 and SDK
« on: October 25, 2009, 07:07:56 PM »

HELP... I don't know what's different but I've installed Win7 64 bit and AHP w/plugins. That works ok. Then I grabbed a program I had written which I called x10monitor.exe along with Interlop.ActiveHomeScriptLib.dll, which when together worked fine in vista, and tried running it. No luck. Got an unhandled exception error 80040154. Can't remember if I got this error 1st or not though, x10monitor.vshost.exe stopped working. Then the system tried to apply the compatability settings. SO, I got VS2008 and loaded the source. Added resource to the ActiveHomeScript1 type library. Ran the program and still errors out. Always stops when trying to send a command 
ActiveHomeObj.SendAction("sendplc", "B2 on"), error says use new keyword to create instance. Now I think VS2008 runs the program in compatability mode too.
I do have a "Imports ActiveHomeScriptLib" at the program start.
I'm lost. Remember this program ran fine in Vista 32bit.
Any ideas?
Thanks
Logged

DaySleepR

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Re: Windows 7 and SDK
« Reply #1 on: October 26, 2009, 07:16:14 PM »

Have you tried running it in Vista compatibility mode?
Right click on exe, properties, compatibility tab.
Logged

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Re: Windows 7 and SDK
« Reply #2 on: October 26, 2009, 07:44:40 PM »

Yep, tried compatability mode. Downloaded Virtual machine and XPmode programs to see if I can get it running in an XP window.

Has anyone got the sdk working in Win7 64 bit?
If someone has and they can write a small VBasic 2008 program that just turns on B2 and post the code so I could copy it, that'd be cool. Also mention any references you had to make.
Hope I can get this working cause I kinda like Win7 but this sucks. B:(

Thanks...
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Windows 7 and SDK
« Reply #3 on: October 27, 2009, 12:25:29 AM »

HELP... I don't know what's different but I've installed Win7 64 bit and AHP w/plugins. That works ok. Then I grabbed a program I had written which I called x10monitor.exe along with Interlop.ActiveHomeScriptLib.dll, which when together worked fine in vista, and tried running it. No luck. Got an unhandled exception error 80040154. Can't remember if I got this error 1st or not though, x10monitor.vshost.exe stopped working. Then the system tried to apply the compatability settings. SO, I got VS2008 and loaded the source. Added resource to the ActiveHomeScript1 type library. Ran the program and still errors out. Always stops when trying to send a command 
ActiveHomeObj.SendAction("sendplc", "B2 on"), error says use new keyword to create instance. Now I think VS2008 runs the program in compatability mode too.
I do have a "Imports ActiveHomeScriptLib" at the program start.
I'm lost. Remember this program ran fine in Vista 32bit.
Any ideas?
Thanks

Sounds like you have run into the same issue I did when I went from 32 bit XP to 64 bit Vista.

By default, .NET is compiled for all platforms.  That way it runs 32 bit on 32 bit systems and 64 bit on 64 bit systems.  However, my experience with the AHP SDK (to date) is that it's only willing to do 32 bit.

If you go to VS [Tools] [Options] [Projects and Solutions] and make sure the box is checked for "Show advanced build configurations", new options will show up in your Project's "Compile" tab.

Then you can create new compile configurations for x86, which will force the code into 32 bit mode and will run on 32 bit systems as well as in the 32 bit "wow64"  mode of 64 bit systems.

Hope that helps!

 >!

Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Re: Windows 7 and SDK
« Reply #4 on: October 27, 2009, 07:33:58 AM »

Great information, thanks Bill.
I'll give it a shot later and post back.
Logged

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Re: Windows 7 and SDK
« Reply #5 on: November 10, 2009, 08:21:04 AM »

Has anyone actually got the SDK working in Windows 7, either 32bit or 64 bit?
I've tried to compile my program 64 bit mode and even installed a 32 bit version of Win7 and compiled with 32 bit mode but no luck.
I still get
ActiveHomeObj.SendAction("sendplc", "B2 on"), error says use new keyword to create instance.
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Windows 7 and SDK
« Reply #6 on: November 11, 2009, 01:01:05 AM »

Has anyone actually got the SDK working in Windows 7, either 32bit or 64 bit?

I would have to answer that "yes".

As a matter of fact, I just exchanged emails with someone that was having trouble getting AHP and my BVC software working on Windows 7 - 64 bit.  Once he downgraded from AHP 3.236 to AHP 3.228, all is well.

The current version of BVC is compiled so as to run in 32 bit mode on 64 bit Windows.

The error you are getting sounds like "ActiveHomeObj" isn't pointing to an instance variable of the "ActiveHome" type.  Check your code and make sure that the declared instance variable "ActiveHomeObj" hasn't gone "out of scope".  Like perhaps you didn't specify "Public" scope and you're trying to access it from within a function other than the one it was declared in?  (Happens to all of us at some point.   :'  )

 >!


Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Re: Windows 7 and SDK
« Reply #7 on: November 11, 2009, 11:34:44 PM »

The error you are getting sounds like "ActiveHomeObj" isn't pointing to an instance variable of the "ActiveHome" type.  Check your code and make sure that the declared instance variable "ActiveHomeObj" hasn't gone "out of scope".  Like perhaps you didn't specify "Public" scope and you're trying to access it from within a function other than the one it was declared in?  (Happens to all of us at some point.   :'  )

It does indeed seem like that is the problem, but this is the same project from VS2008 on vista32 opened in Win7 64bit and Win7 32bit.
Also it looks like the same problem I had when I first started using the SDK, I hadn't included the "Imports ActiveHomeScriptLib",which is currently in "General Declarations" and I hadn't made a refererence to "ActiveHomeScript 1.0 Type Library", which I have confirmed is present.
I tried a program called regdllview.64 and found that Interop.Activehomescript.dll is not registered, and the program couldn't register it.
Another thought is, is it possible I need a .net framework that doesn't come with Win7.

I think I'll try downgrading and see if that works. If not I'm thinking that my CM15a isn't set in Win7 correctly, the only problem with that logic is that AHP operates correctly with the CM15a.
I may try a copy of BVC.
Thanks for the info

Edited to fix the quote by -Bill- (of wgjohns.com)
« Last Edit: November 12, 2009, 02:55:27 AM by -Bill- (of wgjohns.com) »
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Windows 7 and SDK
« Reply #8 on: November 12, 2009, 02:59:50 AM »

Try BVC before downgrading and if BVC doesn't work then try downgrading.

I'm not sure the AHP version is the issue in your case... then again, I'm not sure it's not.   ;)

Between AHP versions and Windows versions and 64 bit vs. 32 bit (not to mention the evil UAC stuff in Windows) there are too many variables.  Just have to keep testing.

 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

Videonut

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 32
Re: Windows 7 and SDK
« Reply #9 on: November 12, 2009, 11:28:57 AM »

I found the problem!
 Bill, you were right in your 1st reply to this thread. BVC ran perfectly so I knew it had to be a compiler problem. However the place I had to fix the problem, in VS2008, was in the menu, Build/Configuration Manager/Active Solution Platforms and there I had to make the change to x86.
For some reason making the change in MY PROJECT/Compile didn't work.
Without your suggestion I never would have found the problem.
I can't thank you enough for your help.
Videonut...
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Windows 7 and SDK
« Reply #10 on: November 17, 2009, 12:22:53 AM »

I found the problem!
 Bill, you were right in your 1st reply to this thread. BVC ran perfectly so I knew it had to be a compiler problem. However the place I had to fix the problem, in VS2008, was in the menu, Build/Configuration Manager/Active Solution Platforms and there I had to make the change to x86.
For some reason making the change in MY PROJECT/Compile didn't work.
Without your suggestion I never would have found the problem.
I can't thank you enough for your help.
Videonut...


In my case, necessity was the mother of research... and what a "mother" it was to research!  ;)   :'

My tried and true XP 32 bit machine crapped out on me and in my haste to find a cheap replacement, I ended up with a Vista 64 bit machine.

Suddenly the BVC software I had written refused to talk to the CM15A!

Obviously, that wouldn't do!  Seriously escalated the 64 bit issue for me.   B:(

Glad I could help!

 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!
 

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