Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.6 KiB

  1. Function EngMgrOnComplete(lSucceeded)
  2. wscript.echo "EngMgrOnComplete Succeeded :" & lSucceeded
  3. end Function
  4. Function WrapperOnProgress(lDone, lTotal)
  5. wscript.echo "WrapperOnProgress Done :" & lDone & " Total : " & lTotal
  6. end Function
  7. Function WrapperOnComplete(lSucceeded)
  8. wscript.echo "WrapperOnComplete Succeeded :" & lSucceeded
  9. end Function
  10. Dim objSEMgr
  11. '
  12. ' Create the object
  13. '
  14. set objSEMgr = wscript.CreateObject("Semgr.PCHSEManager")
  15. '
  16. ' Call Init
  17. '
  18. objSEMgr.Init()
  19. '
  20. ' Set up the variables
  21. '
  22. objSeMgr.sNumResult = 10
  23. objSeMgr.bstrQueryString = "This is a test query string"
  24. '
  25. ' Set up the callback function for the search engine manager
  26. '
  27. objSeMgr.OnComplete = EngMgrOnComplete
  28. '
  29. ' Set up the callback functions for the wrappers
  30. '
  31. set objSECollection = objSEMgr.EnumEngine
  32. for each objSE in objSECollection
  33. objSE.OnComplete = WrapperOnComplete
  34. objSE.OnProgress = WrapperOnProgress
  35. next
  36. '
  37. ' Execute the query
  38. '
  39. objSeMgr.ExecuteAsynchQuery
  40. '
  41. ' Loop through and get the results
  42. '
  43. for each objSE in objSECollection
  44. wscript.echo "Search Engine Name :" & objSE.bstrName
  45. wscript.echo "Search Engine Description :" & objSE.bstrDescription
  46. set objResult = objSE.Result
  47. for each objItem in objResult
  48. wscript.echo " bstrImageURL :" & objItem.bstrImageURL
  49. wscript.echo " bstrTaxonomy :" & objItem.bstrTaxonomy
  50. wscript.echo " bstrTitle :" & objItem.bstrTitle
  51. wscript.echo " URI :" & objItem.bstrURI
  52. wscript.echo " dRank :" & objItem.dRank
  53. wscript.echo " sHits :" & objItem.sHits
  54. wscript.echo " sIndex :" & objItem.sIndex
  55. wscript.echo " sType :" & objItem.sType
  56. wscript.echo ""
  57. next
  58. next