Creating non-user specific printer mappings

I was delivering a PowerShell class, and the question of how to create a remote printer mapping came up. Turns out that enterprise administrators may have the need to help users with their printer connections, setting them up for them. As I started thinking about the problem, it dawned on me that drive and printer…


How do I dump out a string?

The topic came up a while back on one of our aliases – How can I dump out a string? There are a lot of ways do this in the debugger and there are also debugger extensions that will help out with.  What most people in WinDBG do is us the “du” command for Unicode…


What does High Performance Mean?

Over my years in PFE and Microsoft as a whole I have worked on some REALLY cool websites and applications that are used around the world and drive a lot of business.  Getting work on these cool projects is one of the main reasons that I love what I do.  Getting to see what cool…


Passing a Managed Function Pointer to Unmanaged Code

I was working with a customer a while back and they had a situation where they wanted to be able to register a managed callback function with a native API.  This is not a big problem and the sample that I extended did this already.  The question that arose was – How do I pass…


How to set a break point at the assembly instruction that returns an error code

By Linkai Yu  When debugging, there are those situations when you don’t have access to source code, you might have debugging symbols of a program that neither crashes nor generates an exception but simply displays an error message such as “The program encounters an error: 12055”. So you can’t use a debugger to break into the precise location of the error. By the time the error…


Problems with x86 performance Monitor Counters on x64

This has come up a few times recently so I thought I would highlight a post from Todd Carter about how to get the x86 ASP.NET performance counters when running on an x64 OS:   Just thought I would call that posting out since it has been helpful.


IIS and Hyper-V

The other day the topic came up about best practices with IIS and Hyper-V.  One of our team mates pointed out the following links which are an interesting read: These go over the migration of MSDN/TechNet infrastructure over to Hyper-V.  Cool stuff!


Windows Server 2003 Service Pack 2 and 24-bit Color TS Connections

Okay this is a really weird one!  When you install Service Pack 2 on Windows Server 2003 you can no longer connect using MSTSC via Terminal Services (TS)/Remote Desktop(RDP) with a 24-bit color setting.  For the customer I was working with this meant that the applications they are hosting on those servers did not look…


Best Practice – Workflow and Anonymous Delegates

Best Practice Recommendation In your Workflow application (more exactly in the host of your workflow application) never use anonymous delegate like that : AutoResetEvent waitHandle = new AutoResetEvent(false); . . . workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e) { waitHandle.Set(); }; Details The code above is very common and works correctly at least most of the…


Combining NetMon CAP Files

Today I was working on a problem that we thought was network related.  That meant it was time to try out some of those NetMon skills.  NetMon is the Microsoft Network Packet Capture and Analysis tool that is similar to WireShark/ethereal and can the current 3.2 version can be download for free from here -…