Easier Tuple-Like Classes in C#

February 19, 2013

A discussion during the MVP Summit prompted me to think about what would make it easier to use tuple-like classes while preserving valuable naming information of the tuple's constituents. The purpose of this exercise is to try and come up with a solution that does not require modification of existing C# syntax. To set the scene, consider the following method: bool ParseRequest(string request, out string operation, out int id) { string parts; if (request == null || (parts = request.Split(' ')).Length != 2) { return false; } operation = parts; return int.TryParse(parts, out id); } Using this method entails the very inconvenient syntax typical for out parameters: string request =...
tags: ,
2 comments

Identify the User-Mode Drivers Loaded into a WUDFHost.exe Instance

February 8, 2013

Once upon a time, it was fairly challenging to determine which services were running in an individual svchost.exe process. Today, with Process Explorer, there’s nothing easier – just hover over the svchost.exe process and you get a list of services, or double-click an svchost.exe process and go to the Services tab: A similar problem can arise with user-mode drivers (UMDF). User-mode drivers are COM DLLs loaded into WUDFHost.exe processes, and some WUDFHost.exe processes may contain more than one user-mode driver. Process Explorer does not help in identifying which user-mode drivers are loaded into a WUDFHost.exe process,...
one comment

Windows Performance Analyzer

February 6, 2013

In 2008, I blogged about the just-released Windows Performance Toolkit, and the xperf tool that collects ETW events (including stack traces) and displays them in a form that allows basic analysis. Since then, ETW generation and collection have taken a huge leap forward. Microsoft has released a great library for creating ETW providers, and a set of tools (PerfMonitor, PerfView) for analyzing ETW traces in .NET apps. With the release of the Windows 8 SDK, xperf has been superseded by two new tools: WPR (Windows Performance Recorder), which enables ETW providers and captures traces, and WPA (Windows Performance...
2 comments