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

Image may be NSFW.
Clik here to view.

The C runtime library cannot be mixed and matched

In 2011, a customer had an application written in C++ with Visual Studio 2003 that consumes a static library provided by a third party, let's call it contoso.lib. Now, contoso.lib is a static library...

View Article


Image may be NSFW.
Clik here to view.

How do I run a Web search in the user's default Web browser using their...

More than one customer has asked, "How do I run a Web search in the user's default Web browser using their default search provider?" Nobody knows for sure. Windows does define a mechanism for...

View Article


Image may be NSFW.
Clik here to view.

A process inherits its environment from its parent, and the consequences of...

A customer reported that they changed some system-level enviornment variables (include PATH). They also have a batch file that, among other things, runs a program that requires that the PATH be set a...

View Article

Image may be NSFW.
Clik here to view.

Why doesn't GetAddrInfo work from behind a proxy?

A customer was having a problem with the Get­Addr­Info function when running inside a corporate proxy environment. We are trying to get the IP address of, say, www.microsoft.com by using the...

View Article

Image may be NSFW.
Clik here to view.

How can I start my service as soon as possible, before any other service?

A customer wanted to know how they could make their service start before any other service. FIRST! Of course, a simple application of the What if two programs did this? principle shows that this is...

View Article


Image may be NSFW.
Clik here to view.

Why are there all these processes lingering near death, and what is keeping...

A customer (via their customer liaison) asked for assistance debugging a failure that occurs when their system remains up for several weeks. The customer seems to have a complicated system where they...

View Article

Image may be NSFW.
Clik here to view.

How can I tell if Windows Update is waiting for the system to reboot?

Today's Little Program shows how to ask whether Windows Update is waiting for the system to reboot. You might want to check this in your installer, so that you don't try to install your program while...

View Article

Image may be NSFW.
Clik here to view.

Thanks for informing us that you know about the compatibility issue in your...

During the public prerelease period of a version of Windows some time ago, I remember a bug came in from an application developer. It went something like this: Hi, we just tried our program on the...

View Article


Image may be NSFW.
Clik here to view.

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

A security vulnerability report arrived that took the following form: I have discovered a critical security vulnerability in Windows which I intend to present at the XYZ conference. It allows any user...

View Article


Image may be NSFW.
Clik here to view.

How do I call SetTimer with a timer ID that is guaranteed not to conflict...

Suppose you want to create a timer for a window, but you don't know what timers that window already has running. You don't want your timer to overwrite any existing timer, so you need to find a unique...

View Article

Image may be NSFW.
Clik here to view.

Why doesn't my keyboard hook get called for keyboard messages I manually posted?

A customer was generating synthesized keyboard input by posting WM_KEY­DOWN and related messages to a window. They found that a WH_KEYBOARD keyboard hook was not triggering for these keyboard messages...

View Article

Image may be NSFW.
Clik here to view.

What happens to lost timer messages if I don't process them fast enough?

Some time ago, I noted that if your WM_TIMER handler takes longer than the timer period, your queue will not fill up with WM_TIMER messages. The WM_TIMER message is generated on demand, and if your...

View Article

Image may be NSFW.
Clik here to view.

The trust relationship between this workstation and the primary domain...

Just like users, machines have domain accounts. And just like user accounts, machine accounts have passwords. And just like user account passwords, machine account passwords expire (by default, every...

View Article


Image may be NSFW.
Clik here to view.

Why can't I create a file equal to the available disk space?

A customer was trying to exercise some boundary cases in their application, one of which entailed "out of disk space" scenarios. The way they did this was very simple: Call Get­Disk­Free­Space­Ex to...

View Article

Image may be NSFW.
Clik here to view.

If you can't remember the exact text of a dialog box (so you can search for...

Some time ago, I noted that If you're looking for the code that displays a particular dialog box, the most directly way to find it is to look for the dialog box. That works if you have a screen shot...

View Article


Image may be NSFW.
Clik here to view.

Calling ShutdownBlockReasonCreate from my service doesn't stop the user from...

A customer had a service application that needs to perform a sequence of operations that cannot be interrupted by a system shutdown. The service starts performing those operations when it starts up,...

View Article

Image may be NSFW.
Clik here to view.

Hacking the law: On the role of the marriage officiant in the State of...

The role of the officiant in marriages in the State of Washington is kind of strange. For example, the wedding license is filled out in triplicate. One copy goes to the couty clerk. The second copy...

View Article


Image may be NSFW.
Clik here to view.

How do I obtain the comment for a share?

Today's Little Program obtains the comment string for a share. This is what shows up in the net view output like this: C:\>>net view \\scratch Shared resources at \\scratch Share name Type Used...

View Article

Image may be NSFW.
Clik here to view.

First, try reading the error message, episode 4: Even programmers see error...

Same story, different details. It's the same internal programmer's tool which I have been calling Program Q. Many people have written scripts that help to manage your q tables. I'm trying to fribble...

View Article

Image may be NSFW.
Clik here to view.

How do we change permissions on a share as fast as Explorer does it?

A customer wanted to know what they could do to speed up changing permissions on a share. We have a large share (over 50,000 files in over 5000 folders). If we have four or five users with access to...

View Article
Browsing all 3085 articles
Browse latest View live


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