How do the common controls convert between ANSI and Unicode- June 16, 2008 Commenter Chris Becke asks how the common controls convert ANSI parameters to Unicode, since the common controls are Unicode internally. Everything goes through CP_ACP, pretty much by definition. The ANSI code page is CP_ACP. That's what ACP stands for, after all. Now, there are some function families that do not use ANSI. The console subsystem, for example, prefers the OEM character set for its 8-bit strings, and file system functions can go either way, based on the setting controlled by.http://blogs.msdn.com/oldnewthing/archive/2008/06/16/8602155.aspx If you say that you don't care about something, you shouldn't be upset that it contains garbage- June 11, 2008 There are many situations where you pass a structure to a function, and the function fills in the structure with information you request. In some cases, the function always fills in the entire structure (example: GlobalMemoryStatus). In other cases, you tell the function which bits of information you care about, to save the function the effort of computing something you weren't interested in anyway (example: TreeView_GetItem). In the latter case, if you say that you aren't interested in...http://blogs.msdn.com/oldnewthing/archive/2008/06/11/8590589.aspx Why are DLLs uninitialized in the "wrong" order- June 9, 2008 This is really just a corollary to Why are DLLs unloaded in the "wrong" order. Exactly the same logic that explains why DLLs are unloaded in the "wrong" order also explains why they are uninitialized in the "wrong" order. Once you understand the first issue, the second comes for free; just change DLL_PROCESS_DETACH to DLL_THREAD_DETACH in your analysis. Apply the logic to the scenario posed in this comment and you'll see why it too is flawed.http://blogs.msdn.com/oldnewthing/archive/2008/06/09/8582411.aspx Why does OpenProcess succeed even when I add three to the process ID- June 6, 2008 A customer noticed that if you add three to a process ID and pass it to the OpenProcess function, it still succeeds. Why is that Well, first of all, I need to say up front that the behavior you're seeing is an artifact of the implementation and is not part of the contract. You're passing intentionally invalid parameters, what did you expect The context of this question is "We're seeing this behavior and we can't explain it," not "We're using this trick and want confirmation that it's...http://blogs.msdn.com/oldnewthing/archive/2008/06/06/8576557.aspx Why are accelerators for hidden controls still active- June 2, 2008 In the suggestion box, Serge Wautier asked why accelerators for hidden controls remain active. He's apparently rather insistent because he asked the question again a few months later. Asking the same question multiple times reduces the likelihood that I'll answer it. Consider yourself lucky that I wrote this answer before I noticed the duplicate; otherwise I would probably have skipped it. Why are accelerators for hidden controls still active Very simple: Keyboard accessibility. The...http://blogs.msdn.com/oldnewthing/archive/2008/06/02/8568490.aspx |