Page 4 of 5

Re: Wrapper for C# plugin development!

Posted: Fri Oct 25, 2013 12:16 pm
by Osler
I have recompiled the original HBDotNet project in Visual Studio 2013 (Express) targeting .NET framework 4.0 and an x86 CPU. I have successfully used the new dlls in HouseBot running in Windows 7 Ultimate on an x64 CPU (i7-3770).

I have tested using allanstevens Weather device and my own TCP Client device. Amazingly, I am able to instantiate multiple functioning devices using these dlls. There does appear to be some issues as HouseBot will crash as you step through the message boxes when instantiating a second Weather device. However, the device is still created and you are able to modify property values in the second device once HouseBot restarts.

The new dlls are attached.

Osler

Re: Wrapper for C# plugin development!

Posted: Fri Oct 25, 2013 12:20 pm
by Osler
A link to the updated source code.

https://dl.dropboxusercontent.com/u/634 ... 252013.zip

Osler

Scott - if you can host this file it would be helpful. The site seems to choke on it when I try to upload.

Re: Wrapper for C# plugin development!

Posted: Fri Oct 25, 2013 1:01 pm
by dlmorgan999
This is fantastic news! :D I'll give this a try. Also, is your TCP client device something you previously posted? I could definitely use something like that as I transition from RS-232 devices to network devices.

By the way, I seem to remember having the same crash issue on instantiation of a second device when I was working on the original version. Since it didn't seem to have any permanent effects (as you noted), I just ignored it. :wink:

Re: Wrapper for C# plugin development!

Posted: Fri Oct 25, 2013 3:30 pm
by Osler
@dlmorgan999:

See here for the TCP Client:

http://www.cebotics.com/forums/viewtopi ... 1&t=856591

Osler

Re: Wrapper for C# plugin development!

Posted: Sat Oct 31, 2015 6:04 pm
by Steve Horn
I'm revisiting the installation of the Velleman K8055/VM110 device, as I need some additional I/O. When I copied the latest (Osler:Oct 25,2013) versions of HBDotNetBridge.dll into .../Housebot/Plugins/Devices and HBDotNet.dll into .../Housebot/ and restart HB, I get an error during HB startup that reads:

Unable to load Device DLL Module [C:\Program Files\HouseBot\Plugins\Devices\HBDotNetBridge.dll]. Error = [The specified module could not be found. ]

I'm using the installation info from viewtopic.php?f=1&t=855536&p=449615&hilit=K8055#p449615

(The K8055D.dll I put in The Windows folder.)

I either have something in the wrong place or the HBDotNetBridge.dll is referencing something I don't have. Anyone using the K8055/Vm110 card on Win7/64? If so, where do you have the files?

Re: Wrapper for C# plugin development!

Posted: Sun Nov 01, 2015 12:30 pm
by ScottBot
Steve,

I didn't write that one, so I can't help much. I would guess that there is a required DLL that is missing. Sometimes you can find it with a dependency walker (load the DLL into it).

Re: Wrapper for C# plugin development!

Posted: Sun Nov 01, 2015 1:10 pm
by Steve Horn
Thanks; will try that. From what I've read though, I think all the required DLLs are there but may be in the wrong place.

Re: Wrapper for C# plugin development!

Posted: Sun Nov 01, 2015 6:26 pm
by Steve Horn
Ran that dependency walker program against HbDotNetBridge.dll and got this. I have no clue what this means. But did a search for the first one and only found a similarly named file. Any help is appreciated!

Re: Wrapper for C# plugin development!

Posted: Fri Jan 01, 2016 8:34 pm
by Steve Horn
Bump

Re: Wrapper for C# plugin development!

Posted: Sun Apr 10, 2016 10:17 am
by edgar
Hi Steve,

I am working on getting the C# wrapper working. I have it working on one laptop (my test laptop) but it is not working on my 'production' laptop.

Interestingly, I get the same error as you are gettting on my 'production laptop' right now:


I ran the DLL walker program that Scott linked above and I get only one difference: The Test laptop does not show any problems with the MSCVCR120.DLL wheras the Production Laptop Does (and I notice you have issues there as well). This is part of what I am seeing on the Dependency Walker Program:
I will do some googling around to see if i can figure out what is going on. I am not at all an adept programmer though...so it may be a very long shot.

The Production Laptop that is not working shows :
MSVCR120.PNG
MSVCR120.PNG (14.53 KiB) Viewed 41493 times
I hope this helps in figuring this out! :)

Kevin

Re: Wrapper for C# plugin development!

Posted: Sun Apr 10, 2016 10:36 am
by edgar
Update....

My Test laptop which is working has the MSCR120.dll and my production laptop (Main HA system) does not.

Some looking on the web indicates that I need to install the Visual C++ Runtime.

Is this the right solution? I don't want to break anything on my Production machine by doing this. Any guidance? I hope this is what will fix this for folks.

v/r

Kevin

Re: Wrapper for C# plugin development!

Posted: Sun Apr 10, 2016 5:21 pm
by Steve Horn
Thanks for your help on this. Clearly, I don't have a clue what the problem is. And it's been awhile since I posted the bump to revisit this. I'll look at my production HA server and see whats on or not on it re the C++ runtime. I have a sandbox PC that I could cobble together an environment to test with but it would take some time.... Which this time of year I'm short of. All that typed, I'm still very interested in getting this working, so anything you discover, or anyone else can contribute, will be appreciated.

Re: Wrapper for C# plugin development!

Posted: Mon Apr 11, 2016 8:47 am
by Steve Horn
I checked my HB server this morning for a Visual C++ Runtime. There is a 2008 version installed. Dunno if that is sufficient, needs to be updated (to what vintage?) or is even the problem. But FWIW...

Re: Wrapper for C# plugin development!

Posted: Mon Apr 11, 2016 4:27 pm
by edgar
The post I found RE the DLL suggested installing the 2013.

I checked my production system and it was on 2010.
I just installed the 2013 packages and the wrapper is working! YAY!

I hope this helps!

Re: Wrapper for C# plugin development!

Posted: Mon Apr 11, 2016 4:31 pm
by Steve Horn
Well that's good news. I'll try that and hope for the best. This thread has dragged on for awhile...
Thanks!