February 2007 - Posts

Getting to the office today I was handed the keys to getting Microsoft Certified. The course books for the MCTS Web track has arrived and I will be going through them, aim being to write the first exam by mid - year, and I also want to have an above average score. The books I recieved today where:

MCTS Self-Paced Training Kit (Exam 70-536): Microsoft® .NET Framework 2.0 - Application Development Foundation
MCTS Self-Paced Training Kit (Exam 70-528): Microsoft® .NET Framework 2.0 Web-Based Client Development
Programming Microsoft® ADO.NET 2.0 Core Reference
Programming Microsoft® ASP.NET 2.0 Core Reference

I haven't studied for close on 8 years so this is going to be an interesting process, however I am determined to be certified by the end of the year!

Another KZN social has been scheduled for March. Hope to see everyone there. 
 
When: 2nd March 2007 - 18:30 - 20:00
Venue: Newscafe, Musgrave, Durban
Topic: Social
Objective: Come for a drink, have a chat and get to know each other.
RSVP: Please RSVP Here (before 2nd March 2007 10:00 as we might need to book a table)

Microsoft has released Service Pack 2 for Microsoft SQL Server 2005 and Microsoft SQL Server Express. Its a 280MB+ download from:

SQL Server 2005 Service Pack 2

For a brilliant example of how to use the new WPF available in Vista and Framework 3.0 have a look a UniveRSS. It's a truly 3D RSS reader application and a powerfull example of what Vista offers as far as desktop development is concerned.

When I was younger I always wanted to design a truly 3D website, well I can now start at the desktop.

More information here

While browsing the web tonight I came across this gem of a website: Vetusware

It contains a list of all the old software and links to download most of them. There is some genuine classic software like including:

  • Microsoft Windows 1.0
  • Microsoft DOS 1.0
  • CPM
  • Turbo Pascal
  • Fortran
  • Cobol
  • And many more...

Have a look, especially if your of the older generation, some of these applications won't even run on today's machine but just going through the list can make you nostalgic.

As an update to my post regarding my Vista upgrade Acer has finally released their Vista drivers. For my particular notebook it's a whopping 200MB+ download for the drivers and an additional 300MB+ download for the Applications. Unfortunately it's also one of the slowest FTP's I've seen and I can't get more then 13Kb/s from it.

 Anyone that owns an Acer notebook or desktop can get the correct drivers here:

ftp://ftp.work.acer-euro.com/pub/

Edit: For some reason me and Community Server can't agree on how to format this link so please copy and paste it into your browser.

Microsoft made Windows DreamScene available on Ultimate Extra downloads for Windows Vista Ultimate users today. DreamScene is a Ultimate Extra addon that allows you to use any video as your desktop background while using minimal resources. Find out more about it at:

Windows DreamScene

I am behind, I’ll admit that. I briefly played with Beta 2, for about 4 days. When the final release was made to MSDN I downloaded it the same day. Since we moved to Musgrave the 4MB ADSL line has come in very handy.

When I initially played with Vista I didn’t have the hardware to support it, however I have since upgraded, first by getting myself the a Acer TravelMate 5620 (Dual Core 2.0Ghz, 1024MB RAM, 120GB Drive, NVIDIA GeForce Go 256MB) which I am quite proud of. When I installed it in November I had no luck with getting the right drivers. I e-mailed Acer support who insisted that the relevant drivers are available through Windows Update. This was not the case. As I need to use the launch keys to use Wireless and Bluetooth, and often use the Webcam, I decided to uninstall and wait until the official release.

When I joined Bytes I was provided with a company notebook, a HP NX-9420 (Dual Core 1.8Ghz, 1024MB RAM, 80GB Drive, ATI X1600 256MB). After visiting the HP Support Site I loaded the required BIOS updates, downloaded the drivers and decided to give a Dual Boot Vista a shot on the HP. The installation went perfectly, all the drivers detected and after a reboot it worked like a charm. Didn’t even needed to load the downloaded drivers.

I then turned back to the Acer and decided to give it another try. Loaded Vista and was pleasantly surprised when there was only 2 missing drivers listed in Device Manager: Camera and Card Reader. The previous drivers I had for the card reader loaded perfectly. At which point the wheels came off.

Firstly there is no Acer Orbicam drivers that actually work with Vista. To locate drivers look at the last changed dates on the Acer Support FTP site and then check what drivers and OS’s are listed. Not the ideal way to find drivers, and after downloading 4 different drivers I eventually got the camera loaded, however the Camera Software didn’t work and on every second reboot the settings go missing. Back to the drawing board on this one.

While I was looking for the Camera drivers I found 5 versions of the Launch Manager needed to run the launch keys for my Wireless and Bluetooth. Only one worked with Vista, and after installation the Widcomm Drivers I had for Bluetooth also worked. So my only challenge was the Camera. I eventually downloaded drivers from Acer Thailand that works with the Acer. 3 Days later, after no response from support, and in the meantime the various driver installations caused havoc with my machine, and I ended up re-installing 4 times.

Vista is now running. With all the drivers. However I am very disappointed in having bought a very expensive notebook and receiving none existent support from Acer. However spending some time on Google I have come to the conclusion that a lot of users are going to suffer with driver problems on Vista. Which will probably mean the downfall of the OS before it even gets a chance to prove itself.

Out of interest I am booked to go on Vista and Office 2007 training on Thursday, and completed the online assessment for Windows Vista, with a 66% final score. Not to sure that’s so good after all the re-installs. But at least the struggling paid off.

Since starting with Pocket PC development my biggest frustration has always been getting ActiveSync to see the Emulator, as we rely heavily on an RAPI interface we developed due to the requirements of the AMS project. By fluke I came across an article today about using virtual communication drivers to achieve this and then found a way to do this easily.

  1. Open ActiveSync and set the connection type to DMA
  2. Start the required emulator. (In VS 2005 à Tools à Connect to Device)
  3. Open the Device Emulator Manager (In VS 2005 à Tools à Device Emulator Manager)
  4. Right click on the running emulator and select Cradle.

ActiveSync will detect the emulator and connect. When creating a partnership, save the emulator state when closing to keep all the credentials and settings.

I recently needed to be able to achieve two distinct goals with a Windows Service I was writing, the first was the ability to receive command line parameters and the second the ability to run in debug mode. This would also allow for easier debugging without having to register and install the service and then attempt to attach to the process, and after some research came up with the following solution:

Quick Overview

  1. Start service with commandline parameters (from Command Prompt as well as Service Management)
  2. Pass -d parameter to service to allow starting and running from command line without registering as a service

Step One: Main() Class

The first part of the solution requires the following Main() class.

/// <summary>
/// Server Startup Method with Command Line Parameters
/// </summary>
/// <param name="args">Optional Command Line</param>
static void Main(string[] args)
{
   // Create a service base array to load services
   ServiceBase[] objServicesToRun;
   // Create an instance of the service you want to run
   MyServerClass objServer = new MyServiceClass();
   // Pass a boolean flag to the service to force starting from commandline, assume this is false
   objServer.FromCmdLine = false;
   // Process command line options if they exist
   if (args.Length > 0)
   {
      // Loop through all options supplied in command line using foreach
      foreach (string strCmdOption in args)
      {
         // Check for debug option and set commandline to true for server else set to false and pass parameters
         switch (strCmdOption)
         {
            case "-d":
               objServer.FromCmdLine = true;
               break;
         }
      }
   }
   if (objServer.FromCmdLine)
   {
      // If no command line was supplied start windows service
      objServicesToRun = new ServiceBase[] { new Server() };
      ServiceBase.Run(objServicesToRun);
   }
   else
   {
      // Start as non windows service
       objServer.OnStart(new string[] { "", "" });
   }
}

Step Two: OnStart() Event

The second part of the solution requires a change to the server on start, just before the exit point as shown below:

// Declare Public Variable for Server Object
public bool FromCmdLine = false;

protected override void OnStart(string[] args)
{
   // Process your server on start code here...
   ...
   // Check if the service is run from command line
   if (FromCmdLine)
   {
      // Force Service to Start if running Command Line
      Thread.Sleep(Timeout.Infinite);
   }
}

Step Three: Set the commandline in IDE Debug Run options

  1. Right Click on the Project
  2. Click on Properties
  3. Select the Debug Tab
  4. Look for Start Options and under Command Line put: -d

When running the service from Visual Studio it will start up like a normal console application and allow you to set breakpoints etc, however when installed as a service it will act like a Windows Service. Simple and Effective!

As I am part of the SA Developer community I have decided to be more involved with both dotnetorg as well as SA Dev this year. As part of this I am trying to boost the KZN charter and possibly start giving the Guateng team a run for it's money this year.

We will be organizing a few social, information and video events throughout the year and the first one will be this coming Friday, details below. If your from KZN and happen to be available please visit and join SA Developer and RSVP at the following link: KZN First Social

When: 9th February 2007 - 18:30 - 20:00
Venue: Mugg & Bean, Musgrave Centre, Musgrave
Topic: Social
Objective: Come for the drink, stay for the chat.  Here's a chance to meet other developers in your area and talk "geek"
RSVP: KZN First Social (before 9th February 2007 10:00, we need to book a table)