Dev Tip: Opening Commonly-Accessed Files

When I’m writing code, there’s one file I need to access constantly – WinError.h, the file that lists all the Windows errors constants. SSSSoooo… I had to find a way to get to the file which is buried somewhere in the C:\Program Files\blah blah\Visual Studio blah blah\VC\something\include\lots-of files-starting-with-‘W’-and-ending-in-‘h’ folder, often and quickly.

What I did was so simple, it’s almost silly – I placed a link to the file Quick Launch toolbar! Simple as that!

I know this is not rocket-science, but this little tip has saved me a ton of time!

Comments (14)

  1. I’ve used the quick launch toolbar for such purposes for a very long time, and a lot of co-workers have followed, but I’ve noticed people don’t use that area as a shortcut for commonly used files/programs

  2. anon-ex-softie says:

    Um . . . what ever happened to DavidChr’s err.exe? That mined more error codes than just winerror.h. Codes from ntstatus.h, for example.

  3. orcmid says:

    I use it for the little Character Map accessory and a shortcut to my personalized Pandora URL.  I guess I could put Facebook there too but that would definitely cross the line for me.

    I am tempted to put winerror.h there, but honestly Michael, I hardly ever have to find out what those are [;<).

    On the other hand, I could use one that lists all of the VC++ compiler, linker, and build failure codes so that I, ermm, could decode the sketchy problem reports on the MSDN Forum for VC++ Express.  Yes, that’s the ticket.  Hmm, one more little project …

    In case you’re homesick for the Puget Sound, we have started with wind storms and rain followed by drizzle and showers and more rain and low 40s high 50s.  Just in case you are wondering why you are in Austin. Heh.

  4. Another handy place to hang it would be in Visual Studio’s Tools menu, under the External Tools.

    Most likely you will be working in VS when you need to access such a file.

    A similar time saver I have added in External Tools is the "Open Project Directory" command:

    {Command: Explorer.exe – Arguments: $(ProjectDir).}

  5. There’s an easier way than this – and more versatile –

    You have:

    #include <windows.h>

    Now under that, type:

    #include <winerr.h> (or whatever header you wanted to look at)

    Now right click on it, choose ‘open’. The neat thing about this approach is that you’ll get the header that the compiler is really going to use, not some outdated one that isn’t being used – or you find out that you’re not pulling in the most recent one, which is why you’re not building…

  6. Maxim says:

    Whatever happened to Windows Vista desktop search? Typing ‘winerror.h’ in the Start menu search bar should get you to the file within a few seconds…

  7. Richard says:

    Other thing to do is make all the header files in VS (or SDK) read only… just helps accidentally giving yourself some very odd results.

  8. Nathan says:

    Btw, what were you doing in the Community Server page? Trying to install your own blog?

  9. says:

    I also make use of the Favourite Folder, u know!

    Add the "whatever, whatever" to your favourite list, and that’s all.

  10. jigarme says:

    I also use err.exe tool for finding errors, its not only fast, but it gives errors from more than one error defining header files.. !! I have it added in PATH so, wherever you go, err.exe follows 🙂

  11. Derek Noonan says:

    Seems that you’ve actually dragged (and in the process copied) the file itself (rather than a shortcut) to your QuickLaunch folder. If a SP/new SDK updates the file then your one won’t reflect the changes…

  12. according th the QuickLaunch icon, it’s linked to the file in the program files dir.

  13. Jon Hibbard says:

    Ummm…and ur suposed to be a technological expert?

    Heh.  No wonders Microsoft sucks.