views:

316

answers:

4

How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to http://msdn.microsoft.com/library/.

However, for Win32 APIs (say GetLongPathName), this doesn't work: http://msdn.microsoft.com/en-us/library/GetLongPathName.

I want to be able to use the URL in code comments or documentation. So the URL one gets with an MSDN or Google search (for example, http://msdn.microsoft.com/library/aa364980.aspx) isn't really what I'm looking for. I'd really like my code comments to look something like:

// blah blah blah. See http://msdn.microsoft.com/en-us/library/GetLongPathName for more information.

What's the magic pixie dust for Win32 APIs? Or does it only work for .NET methods?

+3  A: 

Google might be your best bet. I know the msdn site search has time and again pointed me in the wrong direction, but a quick switch to Google ("GetLongPathName site:msdn.microsoft.com") never steers me wrong.

japollock
Yes this works to find the URL but it somewhat misses the point of the question. I'd like to have an easy-to-read URL that can be added to comments or documentation.
Jeff Stong
A: 

FWIW if you have the MSDN installed locally on your machine the Zeus editor has a feature to search the local copy of the MSDN.

For example, placing the cursor on the GetLongPathName word within a text document and using the Zeus Help, Quick Help, Current Word menu, the following MSDN page gets loaded:

ms-help://MS.VSCC.v80/MS.MSDN.vAug06.en/fileio/fs/getlongpathname.htm

jussij
A: 

I am using Linkify by cough me, which lets you link

// see msdn:GetLongPathName

to the google search japollock mentions.

peterchen
A: 

You could use MSDN search.

http://social.msdn.microsoft.com/Search/en-US/?Refinement=86&Query=GetLongPathName

Refinement=86 stands for Win32 search.

Kirill V. Lyadvinsky