DCSIMG
Vista - All Your Base Are Belong To Us

All Your Base Are Belong To Us

Mostly .NET internals and other kinds of gory details

Browse by Tags

All Tags » Vista (RSS)
Restart Windows and Restart All Registered Applications: shutdown -g
The Windows Restart Manager (introduced in Windows Vista) supports gracefully shutting down and restarting applications that registered for restart with the RegisterApplicationRestart API. This functionality is used by Windows Update – thanks to the Restart Manager, when I come yawning to my desktop PC in the morning, even following a system restart, I have my Outlook, browser windows, OneNote, Visual Studio, and Messenger all lined up as they were when I went to bed. Suppose you want to initiate...
Debugging Windows Service Startup with Service Isolation
A year and a half ago I touched on the subject of debugging process startup , such as the startup of Windows Services, using the GFlags utility (the ImageFileExecutionOptions registry key). The general idea is to rely on the Windows loader to launch a debugger instead of the debugged process, and trace your way through the process startup code. Unfortunately, this relies on the debugged process to run in the same session as you—otherwise, you won’t be able to actually see the debugger. Starting from...
What Did My Manifest Do: A Referral Was Returned from the Server
The UAC section of an application’s manifest contains two simple settings under the <requestedExecutionLevel> element of the <requestedPrivileges> node: level – asInvoker, requireAdministrator, or highestAvailable. This setting controls whether the application will require elevation before it runs. uiAccess – true or false. This setting determines whether the application will exempt from UIPI rules introduced as part of the Windows Integrity Mechanism. If you really need the uiAccess...
Launch a Process as Standard User from an Elevated Process
There are many well-documented ways for launching an elevated (administrative) process from within a process that is running using standard user credentials. The cleanest way is by giving that process a manifest; if this can’t be done, the ShellExecute “runas” verb is the way to go. This is all yesterday’s news, really. However, there’s a more interesting question: how do you launch a process as the standard user, if the current process is already elevated? As you probably know, a process can’t change...
Features Aren’t Magically Born
Every time I see Pavel working on his laptop, a question pops into my head: Why don’t you use the Aero theme of Windows Vista and Windows 7, and instead use something that closely resembles Windows Server 2003 – especially considering that your laptop is such a beast of a machine? Today I got my answer, well, kind of. Pavel writes : But if I don’t use Aero I don’t get thumbnail previews and other goodies. Why is that? I asked around and didn’t get a satisfying answer. I’m going to call a Raymond...
Windows API Code Pack 0.90
Incredibly, I haven’t got a chance to blog about the Windows API Code Pack yet – even though it’s been out on MSDN Code Gallery for a couple of months already. It’s an open source .NET library which provides interop wrappers to Windows 7 (and Windows Vista) features. In fact, it would be unfair to say that these are wrappers – some of the features are organized and designed to make access from managed code significantly easier than from the native Win32/COM counterparts. By the time of this writing...
What Should I Install – Windows Vista or Windows 7?
The title might imply that this is a question I’ve been pondering about, but in fact I’ve made up my mind a long time ago.  However, I’ve been asked this question multiple times by colleagues (who are usually developers) and friends (who are not necessarily developers).  Therefore, I decided to write down my answer once and for all. I currently have 6 physical machines at home running various Windows 7 builds, as well as multiple virtual machines for testing and other purposes.  All...
Wait Chain Traversal in Windows 7 Resource Monitor
I blogged about wait chain traversal (WCT) a while ago – we’ve seen that it’s quite a useful tool for analyzing system-wide synchronization issues such as multi-process deadlocks, and might actually be useful for intra-process analysis as well.  What I regretted ever since is that there was no Microsoft tool for displaying WCT information, except for some rarely-cooked MSDN samples. This comes to an end with the Windows 7 Resource Monitor.  By the way, if you haven’t been introduced: Reader...
Enable Windows Search Indexing on Folders
The Windows Search, introduced in Vista as part of the core operating system, is an extremely valuable tool in my pocket.  I barely ever use the start menu, ever – and why would I, if every program is just a few keys on the keyboard away? Windows Search indexing (for faster search results) is enabled by default on most of the locations you’d want it to index, but what if your app has a particular scenario in which it uses Windows Search but wants to use it to search non-indexed locations? The...
Managed Preview Handlers
To set context, a preview handler in Windows Vista and/or Outlook 2007 is a component that provides a preview window for a specific file type (or set of file types).  For example, the default preview handler for .jpg files will display a preview of the image in the Windows Explorer or Outlook preview pane: I’ve always had the impression that writing a shell preview handler was a daunting task involving lots of native code implementing obscure COM interfaces.  I’ve also been sure that the...
Waltzing Through the Parallel Extensions June CTP: Synchronization Primitives
Just a few days ago, the Parallel Extensions team has released a new CTP of the Parallel Extensions for .NET 3.5, a.k.a. PFX. This new CTP is not just a bunch of bug fixes - it's packed with new functionality for us to explore. (I've written some introduction bits on the December '07 CTP in the past, so you might want to read them if you haven't played with the PFX yet.) In this post series, we will look at most of the interesting new functionality. Synchronization Primitives This...
Next Generation Production Debugging: Demo 6
This is the last in a series of posts summarizing my TechEd 2008 presentation titled "Next Generation Production Debugging". Previous posts in the series: Introduction and first demo (or how to survive without a debugger) Taking dump files and opening them up; analyzing a memory leak Dissecting deadlocks (native and managed) Analyzing an invalid handle situation After spending some quality time with the debugger, analyzing an invalid handle situation, I approached the final demo. In this...
Next Generation Production Debugging: Demo 4
After utilizing WinDbg and SOS to diagnose a memory leak in our application, I shifted focus to a whole different category of problems - deadlocks. By issuing the "Move" command on a particular picture in the client application, the user ends up with a non-responsive UI. We can't tell for sure whether the reason for the hang is in the UI or in the WCF service being called without forcing our way in with a debugger. However, there's a basic way of diagnosing deadlocks on Windows...
Next Generation Production Debugging: Demo 2 and Demo 3
After seeing what can be done without a debugger , it was time to dive in and start experimenting with actual production debugging techniques. I briefly explained what debugging symbols are (and how you configure your debugger to download symbols for Microsoft product automatically - just set the _NT_SYMBOL_PATH environment variable to srv*C:\Symbols*http://msdl.microsoft.com/download/symbols ), and continued to demonstrate how a dump file can be generated. The one thing many people don't know...
Next Generation Production Debugging: Slides, Code and Demo Transcripts (Demo 1)
To each and every one of you who attended my TechEd session - thanks! There are so many interesting talks and I appreciate the fact you have chosen mine. As I promised, this post is a summary of slides, demo code and the transcripts of each demo I've shown throughout the session. (As soon as the session recording will be available, I will update this post with a link to it.) I divided the demo transcripts into a series of posts because they are fairly long. You can find everything I've written...
More Posts Next page »