The Old New Thing

Why aren't compatibility workarounds disabled when a debugger is attached?

Ken Hagan wonders why compatibility workarounds aren't simply disabled when a debugger is attached. As I noted earlier, many compatibility workarounds are actually quicker than the code that detects whether the workaround would be needed. Now suppose you find a compatibility problem with some applications that expect the IsZoomed ...

What is the hSection parameter to CreateDIBSection for?

The CreateDibSection function creates a special type of bitmap known as a DIB section. We've worked with these guys before: The feature of DIB sections that is by far the most interesting is that the raw pixels in the bitmap are mapped into your process space as if they were normal memory, which you can read from and write to directly. But ...
Comments are closed.0 0
Code

Learning how to cheat at Candy Land

My young niece received the game Candy Land and wants to play it several times a day. Naturally, I am frequently drafted as an opponent. I discovered that my niece cheats rampantly. Sometimes, she will advance three green squares instead of two. Or if a yellow card will take her to a licorice square (lose a turn), she will ignore it and go ...

How to change the debugger attached to a process

Suppose your application crashes and debugger X is automatically connected because that's how the system happened to be configured. But you would prefer to use debugger Y. After installing debugger Y, how do you switch the debugger from X to Y? If you try to connect debugger Y to the process, you get the error ...

The wisdom of seventh graders: Success

Seventh grade students (ages 12 to 13, roughly) were asked to write an essay on what success is and how you know when you've achieved it. The assignment was given under standardized test conditions: 90 minutes with nothing but pencil and paper, with an additional hour available upon request. (In practice, few students ask for the extra hour...

Can you get rotating an array to run faster than O(n²)?

Some follow-up remarks to my old posting on rotating a two-dimensional array: Some people noticed that the article I linked to purporting to rotate the array actually transposes it. I was wondering how many people would pick up on that. I was surprised that people confused rotating an array (or matrix) with creating a rotation matrix. ...

Thanks for coming together to enjoy the holiday together, now get off my lawn

Due to a confluence of circumstances involving parents on an overseas vacation and other older relatives choosing not to attend (probably related to parents being out of town), I ended up being the oldest person at the extended family holiday dinner table. This was a first for me, and I resisted the urge to shout "Get off my lawn!" to the ...

Microspeak: Engagement

Meetings are so passé. You no longer have a meeting with a customer; you have an engagement: I have a customer engagement tomorrow and they have a question surrounding Feature X. Note that this use of the phrase customer engagement is different from the process known as customer engagement. The process is an ongoing interaction...

How about not granting debug privileges to users?

Commenter Yuhong Bao suggests, "How about not granting debug privileges on the user? This will make bypassing the protection impossible." This is such a great idea that Windows has worked that way for years. Normal non-administrative users do not have debug privilege. They can only debug processes that they already have PROCESS_ALL_ACCESS ...