Friday, 19 August 2005

Securing SQL 2000 with IPsec and Group Policy

Here are links to resources mentioned in my presentation to the Adelaide SQL Server User Group (18th August).

Wednesday, 17 August 2005

Getting the name of a Windows Control Panel Applet

I've been working on a program that needs to enumerate all the Control Panel applets in Windows, and ideally get the proper display name (rather than the .cpl filename). You can do this for a specific applet by using the DllImport Attribute to access the CPlApplet function that every applet implements: My problem is that I needed to call this function for all applets (including non-Microsoft ones). .NET allows you to do dynamic P/Invoke code, but the only post I found in Google was from someone who was unable to get it to work. After using ildasm.exe to study what IL was generated by the static version, I noticed that the once major difference was that the dynamic version lacked the "preservesig" statement. The way to add this in is to use a custom attribute - you can't do it via a parameter for any of the methods. The final version in VB.NET is based on the sample code from http://www.thecodeproject.com/csharp/dynamicinvokedll.asp

Monday, 15 August 2005

Thursday, 11 August 2005

SourceForge.net: Project Info - NUnitAsp Code Generator

SourceForge.net: Project Info - NUnitAsp Code Generator: "A tool to generate source code test classes for NUnitAsp from web pages (via a URL) or by analysing .aspx pages" The source code is now in its own SF project!

Monday, 8 August 2005

NUnitAsp Code Generation

Last Thursday I was out visiting the e-business team at Mawson Lakes campus. I was showing them how to use NUnit and NUnitAsp for automated unit testing. As I was setting up a test for NUnitAsp, I noticed how repetitive it was to:
  1. Browse the web page
  2. Find the control
  3. View the source to see the control's id.
  4. Add a variable declaration to the test class.
  5. Add a variable assignment/initialise to the SetUp method for the variable
  6. Back to step 2
I wondered if this could be automated a bit to make it quicker to set up the test classes for NUnitAsp. Not wanting to reinvent the wheel, I joined the developer list for NUnitAsp, and asked the other subscribers if anyone had done this before. No one said they had, but a couple replied saying they'd be interested in the results. So I whipped up a first-effort that you can download here. It still needs a bit of cleaning up, and I'm thinking it might be useful to make it work as a Visual Studio AddIn too, but it does work ok.

Wednesday, 3 August 2005

dp.SyntaxHighlighter

While browsing this site about .NET section handlers, I noticed the nice layout for the source code samples. Clicking on the ? link took me to dp.SyntaxHighlighter: "dp.SyntaxHighlighter is a free JavaScript tool for source code syntax highlighting" I'll have to figure out if it works with Blogger.