Monthly Archives: April 2011

DirectX SDK installation has broke Visual Studio command prompt paths

After installation DirectX SDK (December 2005) Visual Studio 2008 SP1 command prompt can not find tools (such as mt.exe).

I have found the solution here: Serious Visual Studio 2008 install bug that can break your builds.


This leaves us with two solutions of the problem:
1. Remove any path that has ( or ) from your PATH system environment variable. This is what I did.
2. Rewrite the If to use goto like this:

@if "%WindowsSdkDir%" == "" goto SkipSDKVariableSet

@set "PATH=%WindowsSdkDir%bin;%PATH%"
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
@set "LIB=%WindowsSdkDir%lib;%LIB%"


The problem with this is that any upgrades can overwrite this so you have to remember and reapply this change.

GDI object leakage

I have just seen a massive GDI-object leakage today working with some application! 😀

The application runs on Windows XP and when the number of GDI-objects equals to the 9999, there are user-interface artifacts. So, the root cause: that application uses a timer and every time interval it allocates some GDI-resources, but does not release it. I have found the root cause by using Windows Task Manager (Handles counter column).