Page 1 of 1

Where is the VB Wrapper

Posted: Mon Sep 27, 2004 10:51 am
by dlock
Where can I find the VB Wrapper for HouseBot Plugins?



I am a .NET programmer and tried to create a managed VC++ plugin ( I recompiled the SDK examples) but it just crashes HouseBot as soon as it tries to access a property.

Posted: Mon Sep 27, 2004 1:03 pm
by ScottBot
Does it crash with the release and debug builds of your plugin?

Posted: Tue Sep 28, 2004 9:10 am
by dlock
Scott,



I only had chance to carry out some limited testing last night but this is what I have determined so far:



I have recompiled DeviceTemplate with .NET extensions i.e. added /clr and set runtime checking to default (0). I also have a reference to a VB.Net module of mine ( only a reference I do not create any instances of anything)



I then run HouseBotServer.exe through the debugger (VS2003) - with a debug build HB is very slow to start ( I get approx 900 Unhandled Access Violations before it even loads my plugin).



Each time I run a debugging session this gets progressively worse.



Once everything loads all appears OK. I will carryout further testing to create and then invoke my referenced .NET module. I suspect at this point I'll run into problems.



Darren.

Posted: Tue Sep 28, 2004 9:18 am
by dlock
Scott,



I forgot to answer your question. The same process above for a release build does appear to run OK and quicker. I'll try both when when I carry out my next experiment.



Thanks. Darren.

Posted: Sat Oct 02, 2004 8:48 am
by dlock
Scott,



the problems seemed to get worse so I started again (reinstalled everything). THe long and the short of it is that if you take the DeviceTemplate code form the SDK add the /clr switch (.NET Extensions) and run HouseBotServer.exe in the debugger then you get thousands of:

First-chance exception at 0x006042a8 in HouseBotServer.exe: 0xC0000005: Access violation writing location 0x000000b8

This applies to either Debug or Release builds. If you run the plugin directly from HouseBot without debugging it appears to load (although very slowly).



Has anybody managed to call .NET from their HouseBot device plugins?



Rgds, Darren.

Posted: Sat Oct 02, 2004 1:31 pm
by ScottBot
Darren,



I wish I knew more about how .net works to help. I'm guessing that the problems must be in the combination of a .net dll with a non-.net application.



Why don't you build the dll as a non-.net binary? Are you wanting to use C#?

Posted: Sun Oct 03, 2004 1:22 pm
by dlock
Scott,



I have done further research on the internet and I can now see where some of the issues are coming from (DLLMAIN and MFC). I guess I'll wait for the VB Wrapper or COM API.



I was a seasoned MFC programmer some 12 years ago but I have to admit I haven't been near VC++ for 9-10 years. I have developed a number of devices for other Automation frameworks that I wish to integrate with HouseBot (mostly VB6 COM based interfaces - some .NET interfaces). As a minimum I dearly need a COM Plugin interface but idealy it would be .NET allowing a whole host of different languages to integrate. It would be a simple matter to rework my existing plugins to accomodate HouseBot.



Darren.

Posted: Sun Oct 03, 2004 9:42 pm
by ScottBot
There's no doubt that the VB plugin adds real value to the product. I'm sure the Meedio guys will also realize this value and re-develop it as soon as time permits.