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

Image may be NSFW.
Clik here to view.

Why is there a 64KB no-man's land near the end of the user-mode address space?

We learned some time ago that there is a 64KB no-man's land near the 2GB boundary to accommodate a quirk of the Alpha AXP processor architecture. But that's not the only reason why it's there. The...

View Article


Image may be NSFW.
Clik here to view.

Some parts of an interface can change but others can't

When I wrote about asking the compiler to answer calling convention questions, some people were concerned about whether this was a reliable mechanism or whether it was relying on something that can...

View Article


Image may be NSFW.
Clik here to view.

Enumerating notification icons via UI Automation

Today's Little Program uses accessibility to enumerate the current notification icons (and possibly click on one of them). This could be done manually via IAccessible, but the BCL folks conveniently...

View Article

Image may be NSFW.
Clik here to view.

Is there a way to disable a specific balloon notification without disabling...

There is a group policy called Turn off all balloon notifications, but what if you want to turn off only one specific notification? The taskbar does not offer fine-grained policy control over balloon...

View Article

Image may be NSFW.
Clik here to view.

The GetCurrentThread function is like a check payable to Bearer: What it...

The Get­Current­Thread function returns a pseudo-handle to the current thread. The documentation goes into significant detail on what this means, but I fear that it may have fallen into the trap of...

View Article


Image may be NSFW.
Clik here to view.

If only DLLs can get DllMain notifications, how can an EXE receive a...

When a DLL is loaded, it receives a DLL_PROCESS_ATTACH notification, and when it is unloaded (or when the process terminates), it gets a DLL_PROCESS_DETACH notification. DLLs also receive...

View Article

Image may be NSFW.
Clik here to view.

When are global objects constructed and destructed by Visual C++?

Today we're going to fill in the following chart: When does it run?ConstructorDestructorGlobal object in EXEGlobal object in DLL The C++ language specification provides some leeway to implementations...

View Article

Image may be NSFW.
Clik here to view.

Scripting an Internet Explorer window

Today's Little Program takes a random walk through MSDN by starting at the Create­Process page and randomly clicking links. The exercise is not as important as the technique it demonstrates. function...

View Article


Image may be NSFW.
Clik here to view.

The great thing about regular expression languages is that there are so many...

Before you ask a question about regular expressions, you should make sure you and your audience agree on which regular expression language you are talking about. Here is a handy table of which...

View Article


Image may be NSFW.
Clik here to view.

Microspeak: spend

Remember, Microspeak is not merely for jargon exclusive to Microsoft, but it's jargon you need to know. We don't encounter the term spend much in the engineering side of the company, but it's in...

View Article

Image may be NSFW.
Clik here to view.

Poor man's comments: Inserting text that has no effect into a configuration file

Consider a program which has a configuration file, but the configuration file format does not have provisions for comments. Maybe the program has a "list of authorized users", where each line takes...

View Article

Image may be NSFW.
Clik here to view.

Scripting an Internet Explorer window

Today's Little Program takes a random walk through MSDN by starting at the Create­Process page and randomly clicking links. The exercise is not as important as the technique it demonstrates. function...

View Article

Image may be NSFW.
Clik here to view.

The great thing about regular expression languages is that there are so many...

Before you ask a question about regular expressions, you should make sure you and your audience agree on which regular expression language you are talking about. Here is a handy table of which...

View Article


Image may be NSFW.
Clik here to view.

How do I disable Windows 8 touch contact visualizations for my application?

You might have an application (like a game) where the default touch contact visualizations are a distraction. In WinRT, you can disable the contact visualizations by simply saying // JavaScript...

View Article

Image may be NSFW.
Clik here to view.

How can I detect programmatically whether the /3GB switch is enabled?

A customer was doing some diagnostic work and wanted a way to detect whether the /3GB switch was enabled. (Remember that the /3GB switch is meaningful only for 32-bit versions of Windows.) The way to...

View Article


Image may be NSFW.
Clik here to view.

Debugging a hang: Chasing the wait chain inside a process

Today we're going to debug a hang. Here are some of the (redacted) stacks of the process. I left some red herrings and other frustrations. 0: kd> !process ffffe000045ef940 7 PROCESS...

View Article

Image may be NSFW.
Clik here to view.

I marked my parameter as [optional], so why do I get an RPC error when I pass...

Consider the following interface declaration in an IDL file: // Code in italics is wrong interface IFoo : IUnknown { HRESULT Cancel([in, optional, string] LPCWSTR pszReason); }; The idea here is that...

View Article


Image may be NSFW.
Clik here to view.

Debugging a hang: Chasing the wait chain inside a process

Today we're going to debug a hang. Here are some of the (redacted) stacks of the process. I left some red herrings and other frustrations. 0: kd> !process ffffe000045ef940 7 PROCESS...

View Article

Image may be NSFW.
Clik here to view.

Enumerating the ways of distributing n balls into k boxes

Suppose you had n indistinguishable balls and k distinguishable boxes. Enumerate the ways of distributing the balls into boxes. Some boxes may be empty. We can represent each distribution in the form...

View Article

Image may be NSFW.
Clik here to view.

A question about preventing the system from going to the idle state turns out...

A customer asked how they could have their program prevent the system from going to the idle state. Specifically, when the system goes idle, the application gets into a weird state where it starts...

View Article
Browsing all 3085 articles
Browse latest View live


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