Where is the VB Wrapper

HouseBot Plugin Development Discussions.
Post Reply
dlock
Member
Posts: 11
Joined: Fri Sep 17, 2004 5:27 am
Location: Wales - United Kingdom

Where is the VB Wrapper

Post 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.
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Does it crash with the release and debug builds of your plugin?
Scott
dlock
Member
Posts: 11
Joined: Fri Sep 17, 2004 5:27 am
Location: Wales - United Kingdom

Post 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.
dlock
Member
Posts: 11
Joined: Fri Sep 17, 2004 5:27 am
Location: Wales - United Kingdom

Post 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.
dlock
Member
Posts: 11
Joined: Fri Sep 17, 2004 5:27 am
Location: Wales - United Kingdom

Post 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.
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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#?
Scott
dlock
Member
Posts: 11
Joined: Fri Sep 17, 2004 5:27 am
Location: Wales - United Kingdom

Post 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.
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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.
Scott
Post Reply