Welcome to MSDN Blogs Sign in | Join | Help

Michael Howard's Web Log

A Simple Software Security Guy at Microsoft!
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!

Posted: Friday, October 19, 2007 1:39 PM by michael_HOWARD
Filed under:

Comments

Eber Irigoyen said:

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

# October 19, 2007 6:24 PM

anon-ex-softie said:

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

# October 20, 2007 4:23 AM

Dennis E. Hamilton said:

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.

# October 20, 2007 3:55 PM

Dimitris Staikos said:

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).}

# October 21, 2007 9:26 AM

david_leblanc said:

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...

# October 22, 2007 12:50 PM

Maxim said:

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...

# October 22, 2007 4:53 PM

Richard said:

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.

# October 23, 2007 9:13 AM

Nathan said:

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

# October 23, 2007 8:21 PM

folsco.net said:

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

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

# October 26, 2007 7:35 AM

jigarme@live.com said:

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 :)

# October 28, 2007 11:06 AM

Derek Noonan said:

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...

# November 12, 2007 7:58 AM

michael_HOWARD said:

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

# November 12, 2007 7:08 PM

Jon Hibbard said:

Ummm...and ur suposed to be a technological expert?

Heh.  No wonders Microsoft sucks.

# January 3, 2008 5:39 PM
New Comments to this post are disabled
Page view tracker