Quantcast
Channel: October 2016 - The Old New Thing
Browsing latest articles
Browse All 10 View Live

Was it intentional that the Media Control Interface has the same acronym as a...

The Media Control Interface is a programmable interface to multimedia peripherals. It’s probably best known for providing an easy way to prank somebody by repeatedly opening and closing the CD tray....

View Article



Three short questions about LogonUser (with answers!)

A customer had a Web service that runs processes as specific users. There may be multiple such processes running at the same time for a single user account. Here are the questions. And just to be nice,...

View Article

Using DuplicateHandle to help manage the ownership of kernel handles

A customer was using a third party I/O library that also gave you access to the underlying HANDLE, in case you needed it. The customer needed that underlying HANDLE so it could pass it to...

View Article

Is there anything better than GetThreadTimes for obtaining per-thread CPU...

A customer was using the Get­Thread­Times function for high-resolution profiling of performance-sensitive code, but found that its accuracy is rather poor. They were hoping there would be something...

View Article

Why is Identical COMDAT Folding called Identical COMDAT Folding?

We saw a while ago that the linker will recognize that two functions consist of the same code sequence and will use the same bytes to represent both functions, a process known as identical COMDAT...

View Article


Microspeak: lift up

Today’s Microspeak is the verb phrase “lift up”. Here’s a citation: [After a long detailed discussion.] I want to lift up a little and talk about why this is important. I didn’t know what this...

View Article

Why does the documentation for ReadFile say that the lpNumberOfBytesRead...

The documentation for the Read­File function says BOOL WINAPI ReadFile( _In_ HANDLE hFile, _Out_ LPVOID lpBuffer, _In_ DWORD nNumberOfBytesToRead, _Out_opt_ LPDWORD lpNumberOfBytesRead, _Inout_opt_...

View Article

How to electrify your own fence: ProcessStrictHandleCheckPolicy

During process termination, if you try to enter a critical section that is owned by another thread that has already been terminated, the gates are now electrified, and the kernel simply terminates your...

View Article


Why does SetThreadPriority sometimes take a really long time?

A customer had a video application that gathers information as it runs. Every so often, they need to take all this information, process it, and save it to a database. They perform this processing every...

View Article


This processor has no stack (insert spooky laughter)

In the early days of computing, most processors did not have what we today would consider a “stack”. Everything was done with static data. Subroutine linkage on these systems was typically done by...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images

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