Mike Taulty's Blog
Bits and Bytes from Microsoft UK

February 2005 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Office Web Components, C# and Interop Wrappers

    Here's a tiny little "gotcha". I haven't really looked much at the Office Web Components before but I wanted a Chart control today that looks really nice and this has to be the easiest way of getting one :-) I found pretty quickly though that my event handlers on this control weren't firing from .NET and became a little suspicious about the way that the importer had generated its wrapper for me (I seem to remember that Adam Nathan had something to say about this in his mighty tome ). So, I managed to find a KB article that confirmed my fears: it's number 319599 and you can find it here .
  • SQL Server 2005 Service Broker and WSE2.0 SOAP Messaging

    Following up on this previous post about SQL Server 2005 Service Broker , I've been writing a SOAP message transport for the Web Services Enhancements (WSE) 2.0 to move messages using ServiceBroker whilst still gaining advantage of the security, policy, addressing features of WSE2.0. It's important to say that this is purely for fun because it involves installing WSE2.0 on top of the beta .NET Framework 2.0 and there is no way in which the WSE team or the .NET framework team are going to support that kind of scenario. The solution files and source code are all in this zip file here which you can download and play with . I started with the December Community Tech Preview of SQL Server 2005 and the accompanying Visual Studio 2005 build - these are available from MSDN Subscriber Downloads for you to get hold of. Following up on my previous post I've already created constructs in SQL for SoapMessage, SoapContract and also that post details creating some services and queues: SendingService, SendingQueue and ReceivingService...
  • SysInternals & Rootkits

    One of the big security fears at the moment is around Rootkits. I'm a long way from being any kind of security person but the idea of a Rootkit is that you install something malicious onto your PC by mistake and the install modifies the OS in some way (possibly by patching kernel routines) in order that the (now modified) Operating System becomes complicit in hiding the fact that you're running a whole bunch of extra software that you weren't intending to. The consistently stunning guys over at Sysinternals have published a "rootkit revealer" application which tries to detect whether your system is suffering from this kind of damage - I've just run it on my laptop and it's left me feeling a little more comfy than I was before.
  • Filtered Exception Handling in .NET

    I saw a piece of code on a screen at DevWeek the other day and a description that went along side it that left me thinking about something that you don't see very often in .NET. The piece of code looked like something like this; public class ThrowingClass { public static void ThrowingMethod() { try { Console.WriteLine("Start statement"); <--- 1 MethodCallThatThrows(); <--- 2 } finally { Console.WriteLine("Finally statement"); <--- 4 Console.ReadLine(); } } private static void MethodCallThatThrows() { throw new ApplicationException("Exception"); <--- 3 } } Here we've got a piece of code which calls MethodCallThatThrows() which is a method which throws an exception and as part of the discussion it was mentioned that the execution is certain to be as indicated with the arrows above. So, when the MethodCallThatThrows method throws its exception we know that the next piece of code to execute is going to be our finally block. However, that's not always going to be the case ...
  • Human Networks

    I found this on Slashdot and I think I've read something about it before but the RedTacton site and their press release about using the human body as a data network is pretty interesting. Whether you actually need this in the era of Bluetooth and WiFI I'm not so certain?
  • Wrapping IAsyncResult

    I've been trying to write some code and struggling to find continuous blocks of time to do it in. However, something that I keep coming across is a scenario where I want to wrap up some code that already has an asynchronous nature and keep the asynchronous nature of it. To try and explain what I'm on about...Imagine that you're writing some code that is largely based around a FileStream . Perhaps we're trying to write some class that offers up 64K of data from a FileStream at a time (yes, I know, it's pointless but my real example's more complicated). If we're trying to do that we might write some code something like; public class MyReader { public static IAsyncResult BeginRead( string path, byte [] array, AsyncCallback callback, object state) { return ( null ); } public static int EndRead(IAsyncResult result) { return (0); } private static void OnReadCompleted(IAsyncResult result) { } } In our BeginRead function we need to use the FileStream to start an asynchronous read and then in our EndRead we need to surface...
  • In-car music bliss

    I'm based a long way from the Microsoft offices in the UK (it's my fault) and so I spend quite a lot of time in my car. I also trek around the country to lots of different sites so that means more time in the car. My car's got a 6-slot CD changer and, on a long journey, you can very quickly exhaust the CDs that you've stacked into the changer which means that you end up listening to The Archers at 7pm of an evening just for the sake of getting hold of "something different". Consequently, I've been looking for some kind of music jukebox for the car and I've looked at the possibility of using a Windows Mobile-style device or a dedicated MP3 player or an iPod. My main criteria were that it would hold all of my music that I'd never be in the position where it wasn't charged that it would connect up to my PC easily that it would support different music formats that it would integrate with the radio that I've already got in the car Following advice from James I picked up a PhatBox from PhatNoise . Essentially...
  • MSDN Nugget List Growing

    The list of "MSDN Nugget" videos that we have published on the UK MSDN website is growing nicely. We've gone from around 4 to around 10 separate items up there right now. It'll continue to grow as there's a pipeline sitting behind it of things waiting to be published. There's two sets of topics up there right now: there's the today stuff ".NET Nuggets" and the "tomorrow" stuff in the "SQL Server 2005 Nuggets". Take a look. At the very least you've a good chance of seeing a nice photo of me on my holidays in Cornwall last year :-) Whilst you're there, have a look at the MSDN Connection to get your own personalised news feed from MSDN.
  • On Garbage Collection, Scope and Object Lifetimes

    I posted this the other day and then Marcus only went and read it and spotted the glaring error I'd left in the middle of it so this is a re-post... (thanks Marcus!!) For no obvious reason I've sat through a few mentions or even full explanations of .NET Garbage Collection in the past few weeks. In quite a few of those explanations I've heard people link the idea of object lifetimes and scope and (although this explained elsewhere) I wanted to write something down about that stuff. Here we go... In plain old C++, I found scope to be a lovely thing and not only because of its possibilities for encapsulation but mostly because of it's possibilities for offering deterministic finalisation. As an example, I might have something like; #include "stdafx.h" #include <iostream> using namespace std; class InScopeCounter { public : InScopeCounter() { ++_count; } ~InScopeCounter() { --_count; } static int GetCount() { return (_count); } private : static int _count; }; int InScopeCounter::_count = 0; int _tmain...
  • Devweek 2005

    And now for another "message from our sponsors" ;-) I'm speaking at DevWeek next week down in London Village somewhere. You can find the details from their website , I'm on the SQL Server track on Day 2 There's also a whole bunch of my colleagues speaking as well. We have the fantabulous Stephen Turner speaking just before me and we have the lovely Eric Nelson speaking on the first day . Over in the Visual Studio track we've got the dynamic Mr Mike Pelton talking about Office on Day 1 and we have the highly architectural chap Mike Platt speaking on Day 2 If anyone wants to meet up or have a chat I'll be around the conference on day 1 and 2 so drop me a line and we'll have a coffee or something.
  • Microsoft UK Technical Roadshow

    The big shindig that is the UK Microsoft Technical Roadshow (for developers, IT professionals and security folks) is now publicly announced. You can go here http://www.microsoft.com/uk/resources/techroadshow/default.mspx to see the details or I've helpfully copied and pasted it below :-) FREE NEW Microsoft Technical Roadshow The next Roadshow for 2005 is here... register today and book your place! MSDN® and TechNet have joined together again to bring you the next Technical Roadshow delivering a new & improved format incorporating: • A choice of one or two technical days at four locations Simply choose to attend the day and location with the most appropriate content or come along for both! The choice is yours. • 3 technical tracks (Developer, IT Professional and Security) Each track will have specific content for your technical requirements. Choose to attend one track all day or a selection of sessions from different tracks. • Deep technical content Each session will provide in-depth content...
  • Indigo ServiceContract's

    Don Box (no less) has just posted an entry around ServiceContract's in Indigo with some detail as to how various bits fit together. Generally, I try and skim-read blog postings but, from time to time, I have to go and "Mark Post as Unread" with a view to going back and reading it again. With Don's post I had to do just that, go back and read it properly and, with a proper reading, it makes a lot of sense and (once again) Indigo looks to be designed in the way that you'd expect it to work.
  • SQL Server 2005 Service Broker & WSE 2.0

    I've been thinking about trying to use SQL Server 2005 Service Broker as a mechanism for transporting WSE 2.0 messages. Note that what I'm doing is highly dubious as WSE2.0 isn't supported on .NET Framework 2.0 so it's purely for "demo" purposes that let me play a bit with Service Broker. The experiments I've done here are around SQL Server 2005 December CTP and the accompanying build of Visual Studio 2005. Getting Started With Service Broker Service Broker is a completely new set of functionality in SQL Server 2005 which provides a mechanism for queuing and reliable messaging as part of SQL Server. You post a message into a queue on your local SQL Server and it can then go through a number of hops across to the destination SQL Server where it will be "received" from the destination queue. In terms of receiving from queues, you can write application code to do that receipt or the usual model is to write a stored procedure to process messages as they arrive on a queue. Service Broker manages...
  • It's Magic!

    I'm in the process of trying to put together a bit of code but I can't seem to find a spare 3-4 hours to sit down and sort something out. Sometimes I really miss those days where I could stick my head down for 16 hours of code and no-one complained or sent me email that needed answering! In the meantime, something that keeps interrupting my thoughts is this new HTC "magician" device which seems to be be a true mix between PocketPC and SmartPhone. Now...I've owned PocketPC's and I've owned the SmartPhones and my personal preference has long been for the SmartPhone. The primary reason I've got for this is that it fits into my pocket and portability is my number one requirement for a device like this. However, my one biggest complaint about the SmartPhone (and it's not really the fault of the device) is that it's a read-only device. I can read my mail on it (up to a point) and I read one or two websites on it if I'm stuck somewhere with nothing to do but I never, ever write anything on the device (although...
  • David Chappell on Indigo

    David Chappell has just written a really, really (yes, it deserves 2 "really's") excellent introductory article to Indigo over here on MSDN . I've just read the thing end to end and it's excellent - the thing that I appreciate most about the stuff that David writes (and says) is that he seems to do an awful lot of distilling of raw data in order to provide you with just the right level of information. This article won't tell you every single detail that you need to know about building distributed applications with Indigo but it will give you a brilliant overview of what the technology is for, what the major pieces are and how they work. I can't recommend it highly enough - if you've got the spare time, print it out, put your feet up and have a good read :-)
1 2 3 Next >