Mono Zeroconf on Windows
Posted on January 29, 2011
Filed Under Tech | 2 Comments
If you know anything about my classroom control system that I built, you know that the project requires Bonjour. This is the technology Apple uses to help you share your music on a network. Computers discover one another by publishing their address on a multicast port. Because the port is multicast the information gets sent to all computers on the network (you must have a multicast router). I used a library in java called Bonaha that abstracted away a lot of the complexities of Apple’s Bonjour SDK.
I wanted a way to do the same thing in .NET because, well frankly I’d like to make my classroom control system a more cohesive piece of software and not the kludge that it is (in 2 different languages Java and .NET and pieced together with Elmer’s Glue©).
The obvious choice to keep up with the network state is Mono.Zeroconf. It’s a project that’s separate from the main Mono repository itself. I expected this software to work out of the gate. It may work fine on Linux using the Avahi provider; but with the Bonjour Provider on Windows I had to do some modifications of the source to get it to run. Luckily there were others online that had already found the problems for me (but the forum posts were in 2 different places and a little difficult to find.), so for your convenience I am combining those bits of information in this blog post.
First you’ll need to do as Frankenspank suggested on this StackOverflow post. You’ll need to change the UPort Setter in Service.cs file (in the Bonjour Provider Project) to be:
this.port = (ushort) IPAddress.HostToNetworkOrder((short) value);
Next you’ll need to change the OnResolveReply method in the BrowseService.cs file (again in the Bonjour Provider Project).
You’ll need to change the second if statement from
if (AddressProtocol == AddressProtocol.Any || AddressProtocol == AddressProtocol.IPv6)
to
if (AddressProtocol == AddressProtocol.IPv6)
Tags: .NET, Apple, Bonjour, CCS, Java, Mono, Windows, Zeroconf
CCS Update
Posted on August 19, 2009
Filed Under CCS Project | Leave a Comment
You can now download the new CCS Software that should work for XP – Windows 7 via http://files.bryanprice.info Enjoy.
Tags: CCS
Subverting Vista UAC With a Service
Posted on August 17, 2009
Filed Under Tech | Leave a Comment
This is exactly what I was looking for, it took me forever to find it. And so here it is: code to subvert vista uac with a service! http://www.codeproject.com/KB/vista-security/SubvertingVistaUAC.aspx?display=Print. Please thank me later for giving you a link to this. I needed this to be able to lock the keyboard and mouse in my CCS project on standard user accounts on vista. The only thing. I could have used this code a week ago and saved myself a lot of coding.
UPDATE: The Code does not work for XP, so you still have to find ways to make it work for both. So the design I made before is still a good way to do things. I just need to use this for the keyboard and mouse blocker.
Tags: CCS, code, codeproject, service, uac, vista
My CCS Project Interface Working!!!
Posted on June 25, 2009
Filed Under Tech | Leave a Comment
Tags: CCS, Video