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.

98 lines
3.8 KiB

  1. // qrythrd.h Header for query thread
  2. //
  3. // The bg thread communicates with the view using the following messages
  4. //
  5. #define DSQVM_ADDRESULTS (WM_USER+0) // lParam = HDPA containing results
  6. #define DSQVM_FINISHED (WM_USER+1) // lParam = fMaxResult
  7. //
  8. // Column DSA contains these items
  9. //
  10. #define PROPERTY_ISUNDEFINED 0x00000000 // property is undefined
  11. #define PROPERTY_ISUNKNOWN 0x00000001 // only operator is exacly
  12. #define PROPERTY_ISSTRING 0x00000002 // starts with, ends with, is exactly, not equal
  13. #define PROPERTY_ISNUMBER 0x00000003 // greater, less, equal, not equal
  14. #define PROPERTY_ISBOOL 0x00000004 // equal, not equal
  15. #define DEFAULT_WIDTH 20
  16. #define DEFAULT_WIDTH_DESCRIPTION 40
  17. typedef struct
  18. {
  19. INT iPropertyType; // type of property
  20. union
  21. {
  22. LPTSTR pszText; // iPropertyType == PROPERTY_ISSTRING
  23. INT iValue; // iPropertyType == PROPERTY_ISNUMBER
  24. };
  25. } COLUMNVALUE, * LPCOLUMNVALUE;
  26. typedef struct
  27. {
  28. BOOL fHasColumnHandler:1; // column handler specified?
  29. LPWSTR pProperty; // property name
  30. LPTSTR pHeading; // column heading
  31. INT cx; // width of column (% of view)
  32. INT fmt; // formatting information
  33. INT iPropertyType; // type of property
  34. UINT idOperator; // currently selected operator
  35. COLUMNVALUE filter; // the filter applied
  36. // CLSID clsidColumnHandler; // CLSID and IDsQueryColumnHandler objects
  37. // IDsQueryColumnHandler* pColumnHandler;
  38. } COLUMN, * LPCOLUMN;
  39. typedef struct
  40. {
  41. LPWSTR pObjectClass; // object class (UNICODE)
  42. LPWSTR pPath; // directory object (UNICODE)
  43. INT iImage; // image / == -1 if none
  44. COLUMNVALUE aColumn[1]; // column data
  45. } QUERYRESULT, * LPQUERYRESULT;
  46. //STDAPI CDsQuery_CreateInstance(IUnknown* punkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  47. //
  48. // The outside world commmunicates with the thread using messages (sent via PostThreadMessage).
  49. //
  50. #define RVTM_FIRST (WM_USER)
  51. #define RVTM_LAST (WM_USER+32)
  52. #define RVTM_STOPQUERY (WM_USER) // wParam = 0, lParam =0
  53. #define RVTM_REFRESH (WM_USER+1) // wParam = 0, lParam = 0
  54. #define RVTM_SETCOLUMNTABLE (WM_USER+2) // wParam = 0, lParam = HDSA columns
  55. //
  56. // THREADINITDATA strucutre, this is passed when the query thread is being
  57. // created, it contains all the parameters required to issue the query,
  58. // and populate the view.
  59. //
  60. typedef struct
  61. {
  62. DWORD dwReference; // reference value for query
  63. LPWSTR pQuery; // base filter to be applied
  64. LPWSTR pScope; // scope to search
  65. LPWSTR pServer; // server to target
  66. LPWSTR pUserName; // user name and password to authenticate with
  67. LPWSTR pPassword;
  68. BOOL fShowHidden:1; // show hidden objects in results
  69. HWND hwndView; // handle of our result view to be filled
  70. // HDSA hdsaColumns; // column table
  71. } THREADINITDATA, * LPTHREADINITDATA;
  72. //
  73. // Query thread, this is passed the THREADINITDATA structure
  74. //
  75. DWORD WINAPI QueryThread(LPVOID pThreadParams);
  76. VOID QueryThread_FreeThreadInitData(LPTHREADINITDATA* ppTID);
  77. //STDAPI CQueryThreadCH_CreateInstance(IUnknown* punkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);