Thursday, February 16, 2006

I've really gotten into using code snippets and the compiler expansions in VSNET 2005 -- it cuts my typing way down and I love it.  I've always thought it odd that VB.NET had a ton more snippets pre-installed than C# (my language of choice).  But Microsoft has rectified that with the release of C# snippets on MSDN (http://msdn.microsoft.com/vstudio/downloads/codesnippets/default.aspx) which includes most, if not all the VB.NET ones but recoded for C#.

Now, the hard part will be knowing what's there!

posted on 2/16/2006 7:17:20 PM (Central Standard Time, UTC-06:00)  #   

So, at the GNET2 last week, I found out that you can now call Delegate.Invoke instead of using the C# functor syntax.  This makes code much more readable IMO --

delegate void MyCallback(string msg);
...
MyCallback callback;
...
callback += delegate(string msg) { Console.WriteLine(msg); };
...
callback.Invoke("Hello");   // instead of callback("Hello");

Very nice.

posted on 2/16/2006 8:58:44 AM (Central Standard Time, UTC-06:00)  #   
 Wednesday, February 15, 2006

Ok, ok so it's been a while.  I've been very busy with two tasks -- first, I spent the last few weeks doing a Guerrilla .NET for DevelopMentor with Rich Blewitt.  We had a blast together and it was great to hang out with him.  I also spent a day sitting in on DM's new C++/CLI class being taught by the very capable Marcus Heege - incredible stuff which every C++ guy on the Microsoft platform should get into..

The other thing I've been working with is resurrecting an old project of mine - ATAPI which was originally setup to wrap the TAPI 2.x API in an "easy to use" set of C++ classes.  I'd ported it to .NET a few years ago but was not really happy with the results.  I had the chance to revisit it because of a client's requirement to integrate TAPI into their .NET platform code.  So, I spent a couple of weeks working on the codebase again under .NET 2.0 and this time around I'm pretty pleased with the architecture.  I wanted something very easy to use, and I think I've achieved that even though it isn't a complete wrapper. 

For example, to walk through all the lines and dump out the device classes available - you can simply do this:

using System;
using System.Collections.Generic;
using System.Text;
using JulMar.Atapi;

namespace EnumDevices
{
    class Program
    {
        static void Main(string[] args)
        {
            TapiManager mgr = new TapiManager("EnumDevices");
            mgr.Initialize(); // Start up Tapi

            foreach (TapiLine line in mgr.Lines)
            {
                foreach (string s in line.Capabilities.AvailableDeviceClasses)
                    Console.WriteLine("{0} - {1}", line.Name, s);
            }           
            mgr.Shutdown();
        }
    }
}

Cool huh?

So.. why not use the TAPI3 COM API you ask?  Well, as it turns out, it doesn't work that well with the RCW infrastructure in .NET -- check out http://support.microsoft.com/kb/841712/en-us where Microsoft basically says "TAPI3 is too complicated".. like I needed someone to tell me that..

The ATAPI.NET stuff is available from JulMar's download area - you can get it along with a sample program from http://www.julmar.com/samples/atapinet.zip.

enjoy.

posted on 2/15/2006 1:20:58 PM (Central Standard Time, UTC-06:00)  #   
 Thursday, August 25, 2005
My first non-Intel computer
posted on 8/25/2005 10:51:18 AM (Central Standard Time, UTC-06:00)  #   
 Wednesday, August 24, 2005
Installing VSTS in VMWare
posted on 8/24/2005 2:37:19 PM (Central Standard Time, UTC-06:00)  #   
 Thursday, August 11, 2005

I'm Mark Smith (yeah right!), and I work in the Microsoft .NET and Telephony space.  I do consulting in the Dallas Texas area and also teach for DevelopMentor.

posted on 8/11/2005 3:45:46 PM (Central Standard Time, UTC-06:00)  #