|
|
Browse by Tags
All Tags » Code
-
Commenter kokorozashi wonders why you should bother with RegisterWaitForSingleObject when you have MsgWaitForMultipleObjects already .
If you want to pump messages and wait for a kernel object,
then you can change all calls to PeekMessage , GetMessage Read More...
|
-
I mentioned in passing a few years ago that version 6 of the common controls supports only Unicode .
And then other people stepped in to say,
"Well, XYZ uses ANSI and that works for me."
So does it support ANSI or doesn't it? It does and doesn't. All Read More...
|
-
It's great to think about all the things that can go wrong
but you also have to think about the situations that could lead to
those bad things.
In particular,
you have to recognize when you are trying to avoid a bug that is
ultimately outside your component Read More...
|
-
Public Service Announcement:
Daylight Saving Time ends in most parts of the United States
this weekend. I pointed out some time ago that Win32 and .NET deal with daylight saving time differently.
Specifically, Win32 always deals with the time zone you Read More...
|
-
When I wrote about understanding the consequences of WAIT_ABANDONED ,
I mentioned that one of the possible responses was to try to repair
the damage,
but some people are suspicious of this approach . Mind you, I'm suspicious of it, too.
Repairing corruption Read More...
|
-
If you are placed in the unfortunate position of having to debug
a user-mode crash from kernel mode,
one of the first things you have to do is get back to the exception
on the user-mode side so you can see what happened.
We saw earlier
how you can get Read More...
|
-
It was possible to use generic thunks in 16-bit code to allow it to
call into 32-bit code. Why can't we do the same thing to allow 32-bit code to call 64-bit code ? It's the address space. Both 16-bit and 32-bit Windows lived in a 32-bit linear address Read More...
|
-
I was looking at one of those
"my program is consuming 100% of the CPU and I don't know why"
bugs,
and upon closer investigation, the proximate reason the
program was consuming 100% CPU was that one of the threads
was being bombarded with WM_TIMER messages Read More...
|
-
One of the features added to
version 6 of the shell common controls
is a warning balloon that appears if CapsLock is on in a password control.
Let's demonstrate.
Take the scratch program ,
add a manifest that requests version 6 of the common controls Read More...
|
-
People who ask this question invariably under-specify
the question.
They just say,
"How can I increase the number of files I can open at a time?"
without saying how they're opening them.
From the operating system's point of view,
the number of files you Read More...
|
-
Many of the normal interlocked operations
come with variants called InterlockedXxxAcquire and InterlockedXxxRelease .
What do the terms Acquire and Release mean here? They have to do with the memory model and how aggressively
the CPU can reorder operations Read More...
|
-
Each component that uses ACLs to control access
has its own idea of what GENERIC_READ , GENERIC_WRITE , and GENERIC_EXECUTE mean.
It's not like there's a master list that somebody can make that lists them all,
because I can make up a new one right here. Read More...
|
-
The command interpreter cmd.exe has a concept
known as the error level ,
which is the exit code of the program most recently run.
You can test the error level with the IF ERRORLEVEL command: IF ERRORLEVEL 1 ECHO error level is 1 or more <sidebar> Read More...
|
-
Now, it may very well be true that many people who use GetForegroundWindow() as the owner for a dialog box because they don't know any better,
but I'm not convinced that everyone who does so did it out of ignorance;
I'm sure there's some malice in there, Read More...
|
-
Last time , we looked at a customer who wanted to know how to tell
whether a given folder was a Recycle Bin folder or not.
We answered the question as stated,
but made the mistake of not looking
at the problem the customer was trying to solve. I need Read More...
|
|
|
|