Microsoft unveiled this week, with relatively little fanfare, a new feature on MSDN that lets developers search code samples. Users can go to a dedicated MSDN code search page to enter their queries or click on the “Code Search” button at the general MSDN search page. The new feature doesn’t appear to have any special branding, but its URL http://msdn.krugle.com, seems to at least imply a code name.
Krugle — if that is its real name — can filter source code samples by language, project, filename or where in the code the query is matched (within a class definition, function definition, comments, etc).
The search is listed as beta, and at least one user has already run into difficulties. In a thread on MSDN’s feedback forums, user “dmex” complained that searching for GetProcAddress doesn’t return code from that function’s documentation. When I queried “GetProcAddress” I got 763 matches, and the function’s page wasn’t in the top 15. The pages that were returned all seemed to be from actual code files — .h, .cpp, .vb, etc — for projects on CodePlex, indicating that Krugle queries CodePlex rather than code examples embedded in MSDN documentation.