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 ArticleThree 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 ArticleUsing 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 ArticleIs there anything better than GetThreadTimes for obtaining per-thread CPU...
A customer was using the GetThreadTimes 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 ArticleWhy 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 ArticleMicrospeak: 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 ArticleWhy does the documentation for ReadFile say that the lpNumberOfBytesRead...
The documentation for the ReadFile function says BOOL WINAPI ReadFile( _In_ HANDLE hFile, _Out_ LPVOID lpBuffer, _In_ DWORD nNumberOfBytesToRead, _Out_opt_ LPDWORD lpNumberOfBytesRead, _Inout_opt_...
View ArticleHow 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 ArticleWhy 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 ArticleThis 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
More Pages to Explore .....