Welcome to CLR Week. I hope you enjoy your stay. A customer reported that their p/invoke was not working. We aren't getting the proper return codes from the AuditSetSystemPolicy. When the call succeeds, the return code is 1, as expected. But in our tests, when we force the call to fail (insufficient access), the return code is
Ah, TerminateThread. There are still people who think that there are valid scenarios for calling TerminateThread. Can you explain how ExitThread works? We are interested because we have a class called ThreadClass. We call the Start() method , and then the Stop() method, and then the WaitUntilStopped() method, an
A customer was diagnosing repeated blue screen errors on their system. They shared a few crash dumps, and they all had a similar profile: The crash occurred in the file system filter stack as the I/O request passed through the anti-virus software. Some of the crashes reported PROCESS_NAME: ngen.exe. "Could ngen.exe be the problem?" As a gene
This question came in from two customers. I'm pretty sure it was two customers rather than one customer going on a fishing expedition because the questions came six months apart, and the scenarios were different. Suppose you remove all shortcuts to Explorer from the taskbar and the Start menu. Then you create a shortcut to Explorer and put it
While you wait for me to write the Alpha AXP processor architecture overview,¹ I'd like to direct your attention to the ARM processor architecture overview written up by Marion Cole over at the NT Debugging blog. I hope that'll keep you busy for a little while longer. Understanding ARM Assembly Part 1: Processor features.
One of the thing I didn't mention during my discussion lo many years ago on how Windows XP chooses what goes on the front page of the Start menu is that the the last-place position is actually kind of special. In Windows Vista, the last-place position was used to hold the program you ran most recently, regardless of how often you ran it. In a
Suppose you have two programs that are logically one application, and you want them to be treated as a single group on the taskbar, share jump lists, and all that stuff. Basically, even though they are physically separate executables, they should be logically be treated as two facets of the same application. This the opposite of What if my ap
Last time, we looked at counted loops and then improved a simple loop by explicitly pipelining the loop iterations. This time, we're going to take the pipelining to the next level. Let's reorder the columns of the chart we had last time so the instructions are grouped not by the register being operated upon but by the operation being performe
There is a dedicated register named ar.lc for counted loops. The br.cloop instruction acts like this: Consider this loop to increment every 32-bit integer in an array. This could be compiled as Note that the ar.lc register is initialized to one fewer than the number of iterations desired. That's because it counts the number of times the br.
Today we'll look at advanced loads, which is when you load a value before you're supposed to, in the hope that the value won't change in the meantime. Consider the following code: Let's say that the SomeClass has m_value at offset zero, m_errno at offset 4, and m_readCount at offset 8. The naïve way of compiling this function woul