Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

What is the difference between Full Windows Touch Support and Limited Touch...

In the System control panel and in the PC Info section of the PC & Devices section of PC Settings, your device's pen and touch support can be reported in a variety of ways. Here is the matrix: No...

View Article


Image may be NSFW.
Clik here to view.

If 16-bit Windows had a single input queue, how did you debug applications on...

After learning about the bad things that happened if you synchronized your application's input queue with its debugger, commenter kme wonders how debugging worked in 16-bit Windows, since 16-bit...

View Article


Image may be NSFW.
Clik here to view.

Some light reading on lock-free programming

Today is a holiday in the United States, so I'm going to celebrate by referring you to other things to read. I'm going to start with a presentation by Bruce Dawson at GDC 2009, which is basically...

View Article

Image may be NSFW.
Clik here to view.

A user's SID can change, so make sure to check the SID history

It doesn't happen often, but a user's SID can change. For example, when I started at Microsoft, my account was in the SYS-WIN4 domain, which is where all the people on the Windows 95 team were placed....

View Article

Image may be NSFW.
Clik here to view.

Counting array elements which are below a particular limit value using SSE

Some time ago, we looked at how doing something can be faster than not doing it. That is, we observed the non-classical effect of the branch predictor. I took the branch out of the inner loop, but...

View Article


Image may be NSFW.
Clik here to view.

Microspeak: Redlines

To the outside world, redline can mean to mark something for removal, or it could mean the maximum safe speed of an engine. But in the world of Microsoft design, the term redlines (pronounced as if it...

View Article

Image may be NSFW.
Clik here to view.

What happens if I don't paint when I get a WM_PAINT message?

Suppose your window procedure doesn't paint when it gets a WM_PAINT message. What happens? It depends on how you don't paint. If you have an explicit handler for the WM_PAINT message that does nothing...

View Article

Image may be NSFW.
Clik here to view.

If my WM_TIMER handler takes longer than the timer period, will my queue fill...

A customer was worried that they may have a problem with their message queue filling with WM_TIMER messages. "If my WM_TIMER handler takes longer than the timer period, will my queue fill up with...

View Article


Image may be NSFW.
Clik here to view.

Killing a window timer prevents the WM_TIMER message from being generated for...

Calling Kill­Timer to cancel a window timer prevents WM_TIMER messages from being generated for that timer, even if one is overdue. In other words, give this sequence of operations: SetTimer(hwnd,...

View Article


Image may be NSFW.
Clik here to view.

Creating double-precision integer multiplication with a quad-precision result...

Suppose you want to multiply two double-word values producing a quad-word result, but your processor supports only single-word multiplication with a double-word result. For concreteness, let's say that...

View Article

Image may be NSFW.
Clik here to view.

The psychology of confirmation, or something, I don't know what to call it

There is probably a name for this phenomenon. I will illustrate it below. "Is there a way to configure the system to do X?" — Go to the Y dialog and select Z. "It doesn't work." — I just tried it. It...

View Article

Image may be NSFW.
Clik here to view.

If you get a procedure address by ordinal, you had better be absolutely sure...

A customer reported that the Get­Proc­Address function was behaving strangely. We have this code in one of our tests: typedef int (CALLBACK *T_FOO)(int); void TestFunctionFoo(HINSTANCE hDLL) { //...

View Article

Image may be NSFW.
Clik here to view.

What states are possible in a DRAWITEMSTRUCT structure?

The DRAW­ITEM­STRUCT structure has an item­State member which contains a number of bits describing the state of the item being drawn. How do those states map to the underlying control? Most of the...

View Article


Image may be NSFW.
Clik here to view.

Detecting whether a SID is well-known SID

You might think that the Is­Well­Known­Sid function would tell you whether a SID is well-known, but it doesn't. Rather, it tells you whether a SID exactly matches the well-known SID you specified. For...

View Article

Image may be NSFW.
Clik here to view.

Notes on calculating constants in SSE registers

There are a few ways to load constants into SSE registers. Load them from memory. Load them from general purpose registers via movd. Insert selected bits from general purpose registers via...

View Article


Image may be NSFW.
Clik here to view.

When corporate policies meet precision scientific equipment

One of my colleagues used to work as an IT consultant, and one of his clients was a tobacco company. Since they were a tobacco company, the company policy on smoking was "You can smoke anywhere, any...

View Article

Image may be NSFW.
Clik here to view.

If you set up roaming profiles, you are expected to set up each machine...

A customer discovered the following behavior when they set up roaming user profiles on their domain. Consider two machines, 1 and 2. An application A is installed on machine 1, but not machine 2. A...

View Article


Image may be NSFW.
Clik here to view.

It rather involved being on the other side of this airtight hatchway: Account...

A security vulnerability report came in that went something like this: Disclosure of arbitrary data from any user An attacker can obtain arbitrary data from any user by means of the following steps:...

View Article

Image may be NSFW.
Clik here to view.

It's not too late (okay maybe it's too late) to get this gift for the...

A LEGO set to measure Planck's constant.

View Article

Image may be NSFW.
Clik here to view.

How can I query the location of the taskbar on secondary monitors?

A customer wanted to know how to get the location of the taskbar on secondary monitors. "I know that SHApp­Bar­Message will tell me the location of the taskbar on the primary monitor, but how do I get...

View Article
Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>