How to create a dll wrapper

hawkeyetim

Member
Licensed User
Longtime User
Hi Guys

:sign0085:
I need to create a basic4ppc wrapper for a dll created for visual/c++ and need help. First of all what software do i require and second what can you suggest i read to learn how to do it.

The dll will help me control the inputs and output (analog and digital) of a usb control board.

As always you help is much appreciated.

Thanks in advance.

Tim
 

agraham

Expert
Licensed User
Longtime User
You would need Visual Studio 2005 Standard or Visual Studio 2008 Professional both of which cost money. You could use SharpDevelop which is free but I have never used it though others here do.

You can't use Visual Studio 2010 nor any of the free Express editions of any of the versions of Visual Studio. Theoretically you could just use Notepad and the Compact Framework 2.0 SDK, which is free, but I wouldn't recommend that route - it's a bit hair-shirtish. :)

There's some, slightly out of date, information here http://www.b4x.com/forum/code-samples-tips/35-how-create-basic4ppc-library.html

What USB interface board is it?
 

hawkeyetim

Member
Licensed User
Longtime User
I'll try to get my hands on visual just to try would be useful to learn how to write a wrapper.

Thanks agraham

Tim
 

agraham

Expert
Licensed User
Longtime User
Not C++ if you want to produce managed code, which you need to for a library, unless you are a masochist (personal opinion only!).

If you have no existing allegiance to VB then I would recommend Visual C# Studio 2008 Express which you can download from the "Visual Studio 2008 Express" tab on this page here Microsoft Express Downloads

1) I find C# terser and easier to read than VB.NET which I think has grown too verbose in being mapped onto .NET. As they use the same .NET libraries only the language syntax differs.

2) VB sticks extra stuff in the dlls that show up as unwanted objects in Tools -> AddObject. C# generally, but not always, produces "clean" dlls.

3) The C# library source code can be merged when an application is compiled so that the external dll is not necessary to run a compiled exe.

4) Not really a valid reason but Basic4ppc is written in C# and I use C# (must be good! :)).
 
Top