<p>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 <a href="http://msdn.microsoft.com/library/" rel="nofollow noreferrer">http://msdn.microsoft.com/library/</a>.</p>

<p>However, for Win32 APIs (say GetLongPathName), this doesn't work: <a href="http://msdn.microsoft.com/en-us/library/GetLongPathName" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/GetLongPathName</a>.</p>

<p>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, <a href="http://msdn.microsoft.com/library/aa364980.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/library/aa364980.aspx</a>) isn't really what I'm looking for.  I'd really like my code comments to look something like:</p>

<p>// blah blah blah.  See <a href="http://msdn.microsoft.com/en-us/library/GetLongPathName" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/GetLongPathName</a> for more information.</p>

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

[{'answer_id': 75321, 'author': 'japollock', 'author_id': 1210318, 'author_profile': 'https://Stackoverflow.com/users/1210318', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 118638, 'author': 'jussij', 'author_id': 14738, 'author_profile': 'https://Stackoverflow.com/users/14738', 'pm_score': 0, 'selected': False, 'text': '<p>FWIW if you have the <strong>MSDN</strong> installed locally on your machine the <a href="http://www.zeusedit.com/forum/viewtopic.php?p=3758" rel="nofollow noreferrer">Zeus</a> editor has a feature to search the local copy of the <strong>MSDN</strong>.</p>\n\n<p>For example, placing the cursor on the <strong>GetLongPathName</strong> word within a text document and using the <a href="http://www.zeusedit.com/forum/viewtopic.php?p=3758" rel="nofollow noreferrer">Zeus</a> Help, <strong>Quick Help, Current Word</strong> menu, the following <strong>MSDN</strong> page gets loaded: </p>\n\n<p><em>ms-help://MS.VSCC.v80/MS.MSDN.vAug06.en/fileio/fs/getlongpathname.htm</em> </p>\n'}, {'answer_id': 1138828, 'author': 'peterchen', 'author_id': 31317, 'author_profile': 'https://Stackoverflow.com/users/31317', 'pm_score': 0, 'selected': False, 'text': '<p>I am using <a href="http://www.codeproject.com/KB/macros/Linkify.aspx" rel="nofollow noreferrer">Linkify</a> by <em>cough</em> me, which lets you link </p>\n\n<pre><code>// see msdn:GetLongPathName\n</code></pre>\n\n<p>to the google search japollock mentions.</p>\n'}, {'answer_id': 1138850, 'author': 'Kirill V. Lyadvinsky', 'author_id': 123111, 'author_profile': 'https://Stackoverflow.com/users/123111', 'pm_score': 0, 'selected': False, 'text': '<p>You could use MSDN search.  </p>\n\n<p><a href="http://social.msdn.microsoft.com/Search/en-US/?Refinement=86&amp;Query=" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Search/en-US/?Refinement=86&amp;Query=</a><strong>GetLongPathName</strong></p>\n\n<p><code>Refinement=86</code> stands for Win32 search.</p>\n'}, {'answer_id': 72611509, 'author': 'Mr. Doge', 'author_id': 12772224, 'author_profile': 'https://Stackoverflow.com/users/12772224', 'pm_score': 0, 'selected': False, 'text': '<p>MSDN GET api <code>(I don\'t know how new this is)</code></p>\n<pre><code>&quot;https://learn.microsoft.com/api/search?locale=en-us&amp;scoringprofile=semantic-captions&amp;%24top=1&amp;search=&quot; functionName\n</code></pre>\n<p>returns json like such:</p>\n<pre class="lang-json prettyprint-override"><code>{\n    &quot;results&quot;: [\n        {\n            &quot;title&quot;: &quot;KeClearEvent function (wdm.h) - Windows drivers&quot;,\n            &quot;url&quot;: &quot;https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-keclearevent&quot;,\n            &quot;displayUrl&quot;: {\n                &quot;content&quot;: &quot;/windows-hardware/drivers/ddi/wdm/nf-wdm-keclearevent&quot;,\n                &quot;hitHighlights&quot;: [\n                    {\n                        &quot;start&quot;: 41,\n                        &quot;length&quot;: 12\n                    }\n                ]\n            },\n            &quot;description&quot;: &quot;The KeClearEvent routine sets an event to a not-signaled state.&quot;,\n            &quot;descriptions&quot;: [\n                {\n                    &quot;content&quot;: &quot;KeClearEvent function (wdm.h) Article 04/18/2022 2 minutes to read In this article The KeClearEvent routine sets an event to a not-signaled state.&quot;,\n                    &quot;hitHighlights&quot;: [\n                        {\n                            &quot;start&quot;: 0,\n                            &quot;length&quot;: 12\n                        },\n                        {\n                            &quot;start&quot;: 87,\n                            &quot;length&quot;: 12\n                        }\n                    ]\n                },\n                {\n                    &quot;content&quot;: &quot;For better performance, use KeClearEvent unless the caller uses the value returned by KeResetEvent to determine what to do next.&quot;,\n                    &quot;hitHighlights&quot;: [\n                        {\n                            &quot;start&quot;: 28,\n                            &quot;length&quot;: 12\n                        }\n                    ]\n                }\n            ],\n            &quot;lastUpdatedDate&quot;: &quot;2022-04-18T04:31:00+00:00&quot;,\n            &quot;breadcrumbs&quot;: []\n        }\n    ],\n    &quot;spellingCorrection&quot;: [],\n    &quot;scopeRemoved&quot;: false,\n    &quot;count&quot;: 18,\n    &quot;nextLink&quot;: &quot;https://learn.microsoft.com/api/Search?locale=en-us\\u0026search=KeClearEvent\\u0026$skip=1\\u0026$top=1&quot;,\n    &quot;srcheng&quot;: &quot;02&quot;\n}\n</code></pre>\n<p>if you want <em>really</em> fast, you can bind it to a hotkey<br>\n<a href="https://www.autohotkey.com/v2/" rel="nofollow noreferrer">AutohotkeyV2</a></p>\n<pre><code>#SingleInstance force\nListLines 0\nKeyHistory 0\nSendMode &quot;Input&quot; ; Recommended for new scripts due to its superior speed and reliability.\nSetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.\n\nlinkFromName(functionName) {\n    json:=downloadToVar(&quot;https://learn.microsoft.com/api/search?locale=en-us&amp;scoringprofile=semantic-captions&amp;%24top=1&amp;search=&quot; functionName)\n    obj:=JSON_parse(json)\n    if (obj.results.Length) {\n        RegExMatch(obj.results[1].title, &quot;.*?(?=\\s|$)&quot;, &amp;OutputVar)\n        if (OutputVar.0 = functionName) {\n            validUrl:=obj.results[1].url\n        } else if (OutputVar.0 = functionName &quot;W&quot; || OutputVar.0 = functionName &quot;A&quot;) {\n            validUrl:=SubStr(obj.results[1].url, 1, -1) &quot;w&quot;\n        }\n        ; A_Clipboard:=validUrl\n        Run validUrl\n    }\n}\n\n; linkFromName(&quot;GetLongPathNameW&quot;) ;works\n; linkFromName(&quot;GetLongPathName&quot;) ;works\nlinkFromName(A_Clipboard)\n\nExitapp\n\nf3::Exitapp\n\ndownloadToVar(url) {\n    whr := ComObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)\n    whr.Open(&quot;GET&quot;, url, true)\n    whr.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)&quot;)\n    whr.Send()\n    ; Using \'true\' above and the call below allows the script to remain responsive.\n    whr.WaitForResponse()\n    return whr.ResponseText\n}\n\nJSON_parse(str) {\n\n    c_:=1\n\n    return JSON_value()\n\n    JSON_value() {\n\n        char_:=SubStr(str, c_, 1)\n        Switch char_ {\n            case &quot;{&quot;:\n                obj_:=Map()\n                ;object\n                c_++\n                loop {\n                    skip_s()\n                    if (SubStr(str, c_, 1) == &quot;}&quot;) {\n                        c_++\n                        return obj_\n                    }\n\n                    ; key_:=JSON_objKey()\n                    ; a or &quot;a&quot;\n                    if (SubStr(str, c_, 1) == &quot;`&quot;&quot;) {\n                        RegExMatch(str, &quot;(?:\\\\.|.)*?(?=`&quot;)&quot;, &amp;OutputVar, c_ + 1)\n                        key_:=RegExReplace(OutputVar.0, &quot;\\\\(.)&quot;, &quot;$1&quot;)\n                        c_+=OutputVar.Len\n                    } else {\n                        RegExMatch(str, &quot;.*?(?=[\\s:])&quot;, &amp;OutputVar, c_)\n                        key_:=OutputVar.0\n                        c_+=OutputVar.Len\n                    }\n\n                    c_:=InStr(str, &quot;:&quot;, true, c_) + 1\n                    skip_s()\n\n                    value_:=JSON_value()\n                    obj_[key_]:=value_\n                    obj_.DefineProp(key_, {Value: value_})\n\n                    skip_s()\n                    if (SubStr(str, c_, 1) == &quot;,&quot;) {\n                        c_++, skip_s()\n                    }\n                }\n            case &quot;[&quot;:\n                arr_:=[]\n                ;array\n                c_++\n                loop {\n                    skip_s()\n                    if (SubStr(str, c_, 1) == &quot;]&quot;) {\n                        c_++\n                        return arr_\n                    }\n\n                    value_:=JSON_value()\n                    arr_.Push(value_)\n\n                    skip_s()\n                    char_:=SubStr(str, c_, 1)\n                    if (char_ == &quot;,&quot;) {\n                        c_++, skip_s()\n                    }\n                }\n            case &quot;`&quot;&quot;:\n                RegExMatch(str, &quot;(?:\\\\.|.)*?(?=`&quot;)&quot;, &amp;OutputVar, c_ + 1)\n                unquoted:=RegExReplace(OutputVar.0, &quot;\\\\(.)&quot;, &quot;$1&quot;)\n                c_+=OutputVar.Len + 2\n                return unquoted\n            case &quot;0&quot;, &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, &quot;9&quot;:\n                RegExMatch(str, &quot;[0-9.]*&quot;, &amp;OutputVar, c_)\n                c_+=OutputVar.Len\n                return Number(OutputVar.0)\n            case &quot;t&quot;:\n                ;&quot;true&quot;\n                c_+=4\n                return {a:1}\n            case &quot;f&quot;:\n                ;&quot;false&quot;\n                c_+=5\n                return {a:0}\n            case &quot;n&quot;:\n                ;&quot;null&quot;\n                c_+=4\n                return {a:-1}\n\n\n        }\n    }\n\n    skip_s() {\n        RegExMatch(str, &quot;\\s*&quot;, &amp;OutputVar, c_)\n        c_+=OutputVar.Len\n    }\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/75230', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2459/']