Browse by Tags

Tagged Content List
  • Blog Post: Reason number 9,999,999 why you don’t ever use humorous elements in a shipping product

    I just saw an email go by on one of our self hosting aliases: From: <REDACTED> Sent: Saturday, April 30, 2011 12:27 PM To: <REDACTED> Subject: Spelling Mistake for browser in event viewer Not sure which team to assign this to – please pick up this bug – ‘bowser’...
  • Blog Post: Someone is a glutton for punishment

    From Long Zheng , a video of someone who decided to upgrade every version of Windows from Windows 1.0 to Windows 7. The amazing thing is that it worked.
  • Blog Post: It’s a bad idea to have a TEMP environment variable longer than about 130 characters

    I've been working with the Win32 API for almost 20 years - literally since the very first Win32 APIs were written. Even after all that time, I'm occasionally surprised by the API behavior. Earlier today I was investigating a build break that took out one of our partner build labs. Eventually I root...
  • Blog Post: I can make it arbitrarily fast if I don’t actually have to make it work.

    Digging way back into my pre-Microsoft days, I was recently reminded of a story that I believe was told to me by Mary Shaw back when I took her Computer Optimization class at Carnegie-Mellon… During the class, Mary told an anecdote about a developer “Sue” who found a bug in another developer’s “Joe”...
  • Blog Post: The story behind the mysterious “Ding” in Windows Vista.

    I just ran into this fairly old post on Channel 9.  mstefan reported that his applications played a “Ding” noise when selecting an item in a listview (or tree) control.   It turns out that I’d had the problem independently reported to me by one of the people here at Microsoft.  Here were...
  • Blog Post: What’s wrong with this code, part 26 – the answer

    Yesterday I posted a code snippet from inside a real piece of code inside the client side of a client/server utility in a Microsoft product. static DWORD WINAPI _PlayBeep(__in void* pv) { UNREFERENCED_PARAMETER(pv); PlaySound(L".Default", NULL, SND_SYNC | SND_ALIAS); return 0; } ...
  • Blog Post: What’s wrong with this code, part 26 – a real-world example

    This is an example of a real-world bug that was recently fixed in an unreleased Microsoft product.  I was told about the bug because it involved the PlaySound API (and thus they asked me to code review the fix), but it could happen with any application. static DWORD WINAPI _PlayBeep(__in void *...
  • Blog Post: Delay Load is not a good way to check for functionality

    On my previous post , Koro made the following comment : “Don't ever check windows versions.  Instead check for functionality being present or not." You can't always do that. Do I want to add a __try/__except to catch delay-load exceptions around every UxTheme call or just do: g_bTheme=(g_bWinNT&&...
  • Blog Post: Checking file versions is surprisingly hard.

    I was wandering around the web the other day and ran into this post.  In general I don’t have many issues with the post, until you get to the bottom of the article.  The author mentions that his code only runs on Win7 or newer so he helpfully included a check to make sure that his code only...
  • Blog Post: PlaySound(xxx, SND_MEMORY | SND_ASYNC) is almost always a bad idea.

    Whenever you submit a crash report to OCA , a bug gets filed in the relevant product database and gets automatically assigned to the developer responsible for the code.  I had a crashing bug in the PlaySound API assigned to me.    In this case, the call was crashing deep inside of the...
  • Blog Post: Fixing a customer problem: “No Audio Device is Installed” when launching sndvol on Windows Vista

    Yesterday someone forwarded me an email from one of our DirectShow MVPs – he was having problems playing audio on his Windows Vista machine.   Fortunately David (the MVP) had done most of the diagnostic work – the symptoms he saw were that he was receiving a “No Audio Device is Installed” error...
  • Blog Post: I get more spam :)

    I just received this phishing letter, I liked it simply because it was so remarkably brazen: -- Dear Webmail User, This message was sent automatically by a program on Webmail which periodically checks the size of inbox, where new messages are received. The program is run weekly to ensure no one's inbox...
  • Blog Post: What’s wrong with this code, part 25

    Wow, 25 already. This one’s pretty straightforward. Once again, it’s a UI issue, since I’ve been spending most of my time doing UI lately. In this particular case, the code comes from the constructor for an auto-layout class that is used internally in one of our tools. It saves away window handles...
  • Blog Post: I get spam :)

    I just received this spam message the other day: From: Microsoft [mailto:customerservice@microsoft.com] Sent: Saturday, October 11, 2008 11:13 PM To: Larry Osterman Subject: Security Update for OS Microsoft Windows Dear Microsoft Customer, Please notice that Microsoft company has recently issued a Security...
  • Blog Post: What’s wrong with this code part 24 (From an MSDN article)?

    I ran into this bug earlier today and realized that it’d make an awesome “What’s wrong with this code”. I started pulling together a test app when I realized that this MSDN magazine article contains sample code that perfectly exhibits the bug: CRect rectangle; VERIFY(m_splitButton.GetWindowRect...
  • Blog Post: What’s wrong with this code, Part 23 – The Answers

    My last post was all about a problem with what appeared to be some really simple ATL code. It turns out that the problem was easier than I had expected.  James Skimming came up with the answer on the second comment.  The problem here was that the following code (snipped a bit) IMMDeviceEnumerator...
  • Blog Post: What’s wrong with this code, Part 23..

    I recently tracked down a bug that was causing problems in my code.  Once I figured out the bug, I realized it made a good “what’s wrong with this code”… #include "stdafx.h" #include <mmdeviceapi.h> IMMDeviceEnumerator *GetDeviceEnumerator() { CComPtr<IMMDeviceEnumerator>...
  • Blog Post: What’s wrong with this code, part 22 – Drawing Text…

    Recently I’ve been working on something that I’ve never done before in my almost 24 years at Microsoft.    For the past 23ish years, I’ve been a plumber – all the work I’ve done has been under the covers.  But for the next version of Windows, I decided to stretch my boundaries a bit and...
  • Blog Post: Think Geek Responds

    Valorie just received the following email from Think Geek ( in response to our previous issue with them ): From: Caroline Offutt [mailto:<email address at thinkgeek.com>] Sent: Sunday, November 18, 2007 7:05 PM To: <valorie's email address> Cc: Rob Patak Subject: Issues with ThinkGeek order...
  • Blog Post: How to lose customers without really trying...

    Not surprisingly, Valorie and I both do some of our holiday season shopping at ThinkGeek. But no longer. Valorie recently placed a substantial order with them, but Instead of processing her order, they sent the following email: From: ThinkGeek Customer Service [mailto:custserv@thinkgeek.com] Sent...
  • Blog Post: Larry and the "Ping of Death"

    Also known as "Larry mounts a DDOS attack against every single machine running Windows NT" Or: No stupid mistake goes unremembered. I was recently in the office of a very senior person at Microsoft debugging a problem on his machine. He introduced himself, and commented "We've never met, but I've heard...
  • Blog Post: Must my service name have the name of the executable in which it's contained?

    It must be psychic debugging week 'round here. I received the following email on an internal mailing list earlier today: Regarding windows service with ServiceType “SERVICE_WIN32_SHARE_PROCESS”, is there a restriction on the service name such that it can only take the same name as the service executable...
  • Blog Post: What's wrong with this code, part 21 - A Psychic Debugging Example - The answers.

    So for the past couple of posts , I've been walking through a psychic debugging experience I had over the weekend. As I presented the problem, there were three pieces of information needed to debug the problem. An interface: class IPsychicInterface { public: virtual bool DoSomeOperation(int argc, _TCHAR...
  • Blog Post: What's wrong with this code, Part 21 - A psychic debugging example: The missing piece

    As I mentioned yesterday , one of the other developers in my group had hit a sticky problem, and he asked me for my opinion on what was going wrong. There were 3 pieces of information that I needed to use to diagnose the problem, I gave you two of them yesterday: The interface: class IPsychicInterface...
  • Blog Post: What's wrong with this code, part 21, a psychic debugging example

    Over the weekend, one of the developers in my group sent me some mail - he was seeing one of the registers in his code getting corrupted across a procedure call. He was quite surprised to see this, and asked me for any suggestions. With the help of the info he gave me, I was able to figure out what had...
Page 1 of 4 (94 items) 1234