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

Asking for clear written documentation that Require trusted path for...

A customer had turned on the Require trusted path for credential entry policy (under Computer Configuration, Administrative Templates, Windows Components, Credential User Interface). They demanded...

View Article


Image may be NSFW.
Clik here to view.

Why is there a limit of 15 shell icon overlays?

There is a limit of fifteen shell icon overlays. Why fifteen? The value 15 came from the corresponding limit for image lists. The Image­List_Set­Overlay­Image function supports up to 15 image list...

View Article


Why does my C++/WinRT project get errors of the form “consume_Something:...

Last time, we investigated a mysterious error that occurs when linking a C++/WinRT project, and I noted that there’s some good news and some bad news. The good news is that this error message is going...

View Article

I called AdjustTokenPrivileges, but I was still told that a necessary...

A customer had a service running as Local System and wanted to change some token information. The information that they wanted to change required Se­Tcb­Privilege, so they adjusted their token...

View Article

A bug so cool that the development team was reluctant to fix it

Long ago, there was a big filed against Outlook that was titled “Outlook crashes when used violently.” Well that’s an interesting title. The bug was also interesting: What you had to do was create a...

View Article


In the file copy conflict dialog, what happened to the option to copy the new...

If you use Explorer to paste a file into a directory, and there’s already a file with that name in the directory, you get a Replace or Skip Files dialog with options to replace the existing file, skip...

View Article

Why does my C++/WinRT project get errors of the form ‘winrt::impl::produce‘:...

So your C++/WinRT project gets build failures of the form base.h(8208): error C2259: 'winrt::impl::produce<D, I>': cannot instantiate abstract class with [...

View Article

Why does my C++/WinRT project get errors of the form “Unresolved external...

So your C++/WinRT project gets build failures of the form unresolved external symbol "void * __cdecl winrt_make_YourNamespace_YourClass(void)" (?winrt_make_YourNamespace_YourClass@YAPAXXZ) referenced...

View Article


The Resource Compiler defaults to CP_ACP, even in the face of subtle hints...

The Resource Compiler assumes that its input is in the ANSI code page of the system that is doing the compiling. This may not be the same as the ANSI code page of the system that the .rc was authored...

View Article


How can I determine in a C++ header file whether C++/CX is enabled? How about...

Suppose you’re writing a header file that wants to take advantage of C++/CX or C++/WinRT features if the corresponding functionality is available. // async_event_helpers.h #if (? what goes here ?) //...

View Article

What order do the items in the “New” menu appear? It looks kind of random.

When you right-click on an empty space in an Explorer folder and select the New menu item, you always start with Folder and Shortcut, but the rest seems to be a jumbled list of file types. Folder...

View Article

If you can use GUIDs to reference files, why not use them to remember...

You can ask for a GUID identifier for a file, and use that GUID to access the file later. You can even recover a (perhaps not the) file name from the GUID. David Trapp wishes programs would use GUIDs...

View Article

What should you do if somebody passes a null pointer for a parameter that...

If you have a function for which a parameter may not be null, what should you do if somebody passes null anyway? There are multiple layers to this question, depending on the technology you are using,...

View Article


Why does SetFocus fail without telling me why?

One of my colleagues was debugging a program and discovered that a call to Set­Focus returned NULL, which the documentation calls out as indicating an error condition. However, a follow-up call to...

View Article

A simple workaround for the fact that std::equal takes its predicate by value

The versions of the std::equal function that takes a binary predicate accepts the predicate by value, which means that if you are using a functor, it will be copied, which may be unnecessary or...

View Article


How to compare two packed bitfields without having to unpack each field

Suppose you are packing multiple bitfields into a single integer. Let's say you have a 16-bit integer that you have packed three bitfields into: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 r g b Suppose you...

View Article

My initial frustration trying to configure our internal VoIP phones that were...

I remember when Microsoft made their initial internal roll-out of its VoIP phones. The VoIP phones were integrated with a desktop app which let you configure the phone, managed your telepresence, as...

View Article


Alternate definitions for English words, as inferred from bug reports

Here are some terms that appear in bug reports. "Empty" means "There are a bunch of things here, but not the ones I wanted." "Blank" means "There are things, maybe." "The picture is wrong" can mean...

View Article

Predator-prey reversal: Rock lobsters vs whelks on Malgas Island and Marcus...

Malgas Island is dominated by rock lobsters, who happily feast upon whelks. Just 4km away, Marcus Island is dominated by whelks, not a rock lobster to be found. Researcher Amos Barkai couldn't figure...

View Article

How do I destruct an object that keeps a reference to itself, because that...

Consider the case of an ordered work queue. Components can queue work to the worker thread, with the expectation that the work will run sequentially. class OrderedWorkQueue { public:...

View Article
Browsing all 3085 articles
Browse latest View live


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