Click Here to Install Silverlight*
United StatesChange|All Microsoft Sites
MSDN
|Developer Centers|Library|Downloads|Code Center|Subscriptions|MSDN Worldwide
Search for


Advanced Search
MSDN Home > MSJ > March 1997
March 1997


The Internet never ceases to amaze. Our latest Web-page plaything has become Search Voyeur (http://voyeur.mckinley.com/voyeur.cgi), brought to you by the folks at Excite. This page shows you a sampling of search queries currently being run on the Magellan search engine. The results are not surprising—the Web is clearly a melting pot of character. Let's just take a look at ten of these Search Voyeur samplings. (The samples have been sanitized to remove the seven things you can't say on television, plus a few more phrases.)
  judge fujisaki
  hallucination chatroom
  instantaneous matter transport
  enema
  nervousing
  kinky stuff
  auto claims adjustor exam questions
  clams
  clinical rheumatology
  l. ron hubbard
What does this say about folks searching the Web? What do they want? Do hopeful insurance reps like to drop acid and beam over to Fujisaki's courtroom? Once they become accredited adjustors, do they throw clambakes for Scientologists? And what is Nervousing?
We see a challenge for Web programmers (beyond trying to satisfy those looking for kinky arthritis treatments): we better write some pretty sophisticated unnatural- language processing software for our Web apps. Even though the Internet and email have made writers out of almost everyone, it hasn't helped anyone's spelling. Every third query displayed by Search Voyeur is mispelled. Even our wired schoolkids seem to have a little trouble with spelling: type "congradulations" into AltaVista and check out the 3000 or so hapless spellers working the Web. It's Web Darwinism: spell it right and you'll get the right info; spell it wrong and you'll get the wrong info!
Speaking of sophisticated text-processing challenges, how many of you typed "Where's the missing text between Page 26 and Page 28 of the December 1996 MSJ?" into Yahoo this month? While we were busy scurrying around trying to get a "Tickle Me Elmo" for less than the price of a Pentium Pro, we seemed to let a few words slip away. Here's the entire two paragraphs, in case your search engine came back empty-handed:

Don't create threads with the C runtime functions beginthread or beginthreadex if the threads will access any MFC objects. The framework uses CWinThread to manage thread-specific data. You should use AfxBeginThread to start your threads (or call the CWinThread constructor and its CreateThread method). CWinThread::CreateThread eventually calls beginthreadex after taking care of some setup and synchronization.
Don't expect to be able to access any MFC objects not created within your thread. Each thread gets its own handle map within MFC, which means, for instance, that a handle to a CWnd passed to a thread method may be invalid inside the thread. Instead, pass handles to threads as their native HANDLE type, and then use the FromHandle or Attach methods to obtain a handle to an MFC object. Sometimes you don't have to go to this much trouble. CThreadSafeWnd::PaintBall, for instance, takes a pointer to a CWnd as an argument and works fine. It would take delving deeply into Windows internals to determine which situations require special handling and which don't. I suggest that you try the simple approach first and then, if that doesn't work, resort to FromHandle or Attach.

Hey, don't stay up too late with that Search Voyeur page—we wouldn't want to see you doing anything nervousing.


© 1997 Microsoft Corporation. All rights reserved. Legal Notices.

© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies
Microsoft