Category Archives: Win32

Checking if your Graphics software runs on GPU

What are we asking exactly? This is actually not that easy to phrase. If you see anything on a screen, your software does make use of some graphics processing unit – but it is more likely you’re interested in particular … Continue reading

Posted in DirectX, Win32 | 1 Comment

Tracking the Current Directory from the debugger: RtlpCurDirRef

Some rogue code was changing our current directory from under our feet, and we needed to catch it in action. I was looking for a memory location to set a data breakpoint on. (Note: for the remainder of this post … Continue reading

Posted in Debugging, VC++, Win32 | Leave a comment

On API-MS-WIN-XXXXX.DLL, and Other Dependency Walker Glitches

Dependency walker is the tool of choice for static dependency analysis of native binaries (it has some dynamic analysis too, but that niche at least has some alternative solutions). It is in a rather sorry state, however – development seems … Continue reading

Posted in Win32 | 15 Comments

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP

(A more appropriate but even-less-catchy title might have been ‘accelerating runs from the debugger‘. As elaborated below, these two are not strictly equal). A common notion is that debug builds can and should carry as much debugging overhead as one … Continue reading

Posted in Debugging, Visual Studio, Win32 | Leave a comment

Debugging Handle Leaks

This is all well documented stuff and I won’t go into details – it’s here mostly for self reference (3rd time I had to chase this down in google). Steps are: (1) Install WDK to integrate the WinDbg engine with … Continue reading

Posted in Debugging, Visual Studio, Win32 | Leave a comment

Reading Specific Monitor Dimensions

Almost 2 years ago I wrote about the proper way of getting the EDID – and in particular the physical monitor size. I did leave a loose end: I actually had to query the dimensions of a specific monitor (specified … Continue reading

Posted in Win32 | 7 Comments

Solving rxinput.dll Crashes

Recently I started getting hit by access violations with weird stacks: It seems an exception is thrown early in the life of some thread, during the initialization routine of rxinput.dll – a dll I never heard of. Naïve googling taught … Continue reading

Posted in DirectX, Win32 | 3 Comments

Entry Point Not Found, and other DLL Loading Problems

Occasionally I come across DLL load problems: The verbosity of the error messages varies greatly. In their raw form these include at least the DLL name, but as various frameworks come into play (for the error message above, it’s .net) … Continue reading

Posted in Debugging, Win32 | 17 Comments

RGB vs. BGR in Bitmaps

What is the channel order in bitmap pixels? Does the R channel occupy the least- or most- significant byte? Ah, the answer to this simple question held me back for nearly a day while debugging some image processing code. MSDN, … Continue reading

Posted in Win32 | Tagged , | 1 Comment

Three F-keys Gotchas

We recently did a small internal app, that had to use all 12 F-keys – which turned out to be surprisingly cumbersome. I hadn’t found this stuff concentrated on a single place, and certainly it could have saved me some … Continue reading

Posted in MFC, Win32 | 4 Comments