Today's Little Program uses the
function to print the mapping of logical processors to
physical processors,
as well as the mapping of logical processors to packages.
(A dual-core processor is a single package with two cores.
If those cores are themselves dual-hyperthreaded, then you have
four logical processors total.)
The helper function tak...
Here's a little puzzle
inspired by an actual bug:
Can the assertion at the start of
ever fire?
Naturally, the answer is Yes,
otherwise it wouldn't be a very interesting article.
The assertion can fire if the worker thread starts running
before the call the returns.
In that case, the caller hasn't yet received the
handle or ID of the newly...
Windows 7 introduces a new flag to the function called . The documentation says that it "uses a larger buffer for directory queries, which can increase performance of the find operation." This is classic MSDN-style normative documentation: It provides "just the facts". Far be it for MSDN to tell you how to write your application; the job of f...
Today's Little Program takes
the JavaScript application from a few years ago
and converts it to C#.
This was inspired by a customer who started with the question,
"How can I close all Internet Explorer windows programmatically?"
This was a strange request.
After all, the user may be rather upset that their Amazon shopping
spree was suddenly ter...
A customer had a supervisor process whose job is to launch two threads. Each thread in turn launches a child process, let's call them A and B, each with redirected standard handles. They spins up separate threads to read from the child processes' stdout in order to avoid deadlocks. What they've found is that even though child process&nbs...
We saw
over a decade ago
(my goodness I've been doing this way too long)
that the
and
functions
do not take menu wrapping into account because they don't
take a window handle parameter,
so they don't know what menu to test for wrapping.
Still, they are useful functions if you aren't worried about
menu wrapping
because they let you do window siz...
Say you launch a program, and for whatever reason the program takes a long time to start up, so you start doing something else, say launching Calculator and balancing your checkbook. Eventually, the program you launched a while back gets itself off the ground and creates its main window. And the window sits in the background (since the window manag...
In our
discussion ,
we saw that you can declare a pure virtual function with the
syntax,
and if you try to call one of these functions from the base class,
you will get the dreaded R6025 - pure virtual function call
error.
In that article, I wrote that a pure virtual function is
"a method which is declared by the base class, but for which
no i...