Hula#

I have a small need to be able to use C# to write programs which can access parts of Hula, so have started to write some libraries. One can access the MDB system, the other attempts to speak NMAP.

The MDB class is built over PInvoke, so it should use any MDB back end, and is therefore quite advanced. The NMAP library is native managed code, and isn't nearly as complete (and is probably less interesting).

Using the MDB library

The library for MDB has two interfaces. Hula.MDBRaw is the direct PInvoke class over libhulamdb; all the function names and arguments are the same except that they don't begin with MDB. Hula.MDB is a nicer interface though, and designed to be better for C# code.

An example of some basic usage:


	using System;
	using Hula;
	
	..
	
	MDB mdb = new MDB();
	mdb.InitLibrary();
	mdb.Authenticate(null, null);
	
	// create 'foobar' user
	MDBObject user = mdb.AddObject ("\\Tree\\Context", "foobar", "User");
	user.AddAttribute("Given Name", "Foo");
	user.AddAttribute("Surname", "Bar");
	user.ChangePassword (null, "password");
	
	// remove 'foobar' user
	user.Delete();
	

More API will be added as and when I need it :o)

Download

hula-sharp.tar.gz. I will update this as demand requires ;) There are no binaries yet.

For now, you probably need to run my Debian binaries - there are two bugs in Hula which you need to fix before things work properly.