Showing results for 2014 - Page 31 of 31 - The Old New Thing

Jan 6, 2014
0
0

How do I obtain the computer manufacturer's name via C++?

Raymond Chen
Raymond Chen

The way to get the computer manufacturer and other information is to ask WMI. WMI is much easier to use via scripting, but maybe you want to do it from C++. Fortunately, MSDN takes you through it step by step and even puts it together into a sample program. But I'm going to write the code myself anyway. Today's Little Program extracts the c...

Code
Jan 3, 2014
0
0

What happened in real-mode Windows when somebody did a longjmp into a discardable segment?

Raymond Chen
Raymond Chen

During the discussion of how real-mode Windows handled return addresses into discarded segments, Gabe wondered, "What happens when somebody does a into a discardable segment?" I'm going to assume that everybody knows how traditionally works so I can go straight to the analysis. The reason is tricky is that it has to jump to a return address...

History
Jan 2, 2014
0
0

If the cursor clip rectangle is a global resource, how come I can't change it with ClipCursor?

Raymond Chen
Raymond Chen

A customer reported that the function was not working. "The cursor clip rectangle is a shared global resource, so I should be able to change it any time I like. My app installs a global mouse hook and sets the clip cursor inside the hook function, but the change doesn't have any effect. Why can't I change the clip cursor inside a mouse hook?" Sur...

Code
Jan 1, 2014
0
0

We know your job is hard, you don't have to show us

Raymond Chen
Raymond Chen

Some years ago, I attended a internal presentation where one group was teaching another group how to use their new feature. This particular feature was a "Just plug in the things you want, click the Apply button, and sit back and relax while we figure out how to do what you asked" type of feature. The presentation leader showed some examples of th...

Other