Source code of Windows XP (NT5)
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.

175 lines
6.7 KiB

  1. #ifndef __dsclintp_h
  2. #define __dsclintp_h
  3. #ifndef GUID_DEFS_ONLY
  4. #include "iadsp.h"
  5. #include "comctrlp.h"
  6. #define DSDSOF_INVOKEDFROMWAB 0x80000000 // = 1 => invoked from WAB
  7. //
  8. // The Exchange group use the DsBrowseForContainer API to brows the Exchange
  9. // store, and other LDAP servers. To support them we issue this callback
  10. // which will request the filter they want to use and any other information.
  11. //
  12. typedef struct
  13. {
  14. DWORD dwFlags;
  15. LPWSTR pszFilter; // filter string to be used when searching the DS (== NULL for default)
  16. INT cchFilter;
  17. LPWSTR pszNameAttribute; // attribute to request to get the display name of objects in the DS (== NULL for default).
  18. INT cchNameAttribute;
  19. } DSBROWSEDATA, * PDSBROWSEDATA;
  20. #define DSBM_GETBROWSEDATA 105 // lParam -> DSBROWSEDATA structure. Return TRUE if handled
  21. //---------------------------------------------------------------------------//
  22. //
  23. // IDsFolderProperties
  24. // ===================
  25. // This is a private interface used to override the "Properties" verb
  26. // displayed in the DS client UI.
  27. //
  28. // Below the {CLISD_NameSpace}\Classes\<class name>\PropertiesHandler is
  29. // defined a GUID we will create an instance of that interface and
  30. // display the relevant UI.
  31. //
  32. // dsfolder also supports this interface to allow the query UI to invoke
  33. // properties for a given selection.
  34. //
  35. //---------------------------------------------------------------------------//
  36. #undef INTERFACE
  37. #define INTERFACE IDsFolderProperties
  38. DECLARE_INTERFACE_(IDsFolderProperties, IUnknown)
  39. {
  40. // *** IUnknown methods ***
  41. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  42. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  43. STDMETHOD_(ULONG,Release) (THIS) PURE;
  44. // IDsFolder methods
  45. STDMETHOD(ShowProperties)(THIS_ HWND hwndParent, IDataObject* pDataObject) PURE;
  46. };
  47. //---------------------------------------------------------------------------//
  48. //---------------------------------------------------------------------------//
  49. // Private helper API's exported by 'dsuiext.dll'.
  50. //---------------------------------------------------------------------------//
  51. //
  52. // To communicate information to the IShellFolder::ParseDisplayName method
  53. // of the Directory namespace we pass a IBindCtx with a property bag
  54. // associated with it.
  55. //
  56. // The property bag is used to pass in extra information about the
  57. // objects we have selected.
  58. //
  59. #define DS_PDN_PROPERTYBAG L"DsNamespaceShellFolderParsePropertyBag"
  60. //
  61. // These are the properties passed to the objcts
  62. //
  63. #define DS_PDN_OBJECTLCASS L"objectClass"
  64. //---------------------------------------------------------------------------//
  65. // String DPA helpers, adding strings to a DPA calling LocalAllocString and
  66. // then the relevant DPA functions.
  67. //---------------------------------------------------------------------------//
  68. STDAPI StringDPA_InsertStringA(HDPA hdpa, INT i, LPCSTR pszString);
  69. STDAPI StringDPA_InsertStringW(HDPA hdpa, INT i, LPCWSTR pszString);
  70. STDAPI StringDPA_AppendStringA(HDPA hdpa, LPCSTR pszString, PUINT_PTR presult);
  71. STDAPI StringDPA_AppendStringW(HDPA hdpa, LPCWSTR pszString, PUINT_PTR presult);
  72. STDAPI_(VOID) StringDPA_DeleteString(HDPA hdpa, INT index);
  73. STDAPI_(VOID) StringDPA_Destroy(HDPA* pHDPA);
  74. #define StringDPA_GetStringA(hdpa, i) ((LPSTR)DPA_GetPtr(hdpa, i))
  75. #define StringDPA_GetStringW(hdpa, i) ((LPWSTR)DPA_GetPtr(hdpa, i))
  76. #ifndef UNICODE
  77. #define StringDPA_InsertString StringDPA_InsertStringA
  78. #define StringDPA_AppendString StringDPA_AppendStringA
  79. #define StringDPA_GetString StringDPA_GetStringA
  80. #else
  81. #define StringDPA_InsertString StringDPA_InsertStringW
  82. #define StringDPA_AppendString StringDPA_AppendStringW
  83. #define StringDPA_GetString StringDPA_GetStringW
  84. #endif
  85. //---------------------------------------------------------------------------//
  86. // Handle strings via LocalAlloc
  87. //---------------------------------------------------------------------------//
  88. STDAPI LocalAllocStringA(LPSTR* ppResult, LPCSTR pszString);
  89. STDAPI LocalAllocStringLenA(LPSTR* ppResult, UINT cLen);
  90. STDAPI_(VOID) LocalFreeStringA(LPSTR* ppString);
  91. STDAPI LocalQueryStringA(LPSTR* ppResult, HKEY hk, LPCTSTR lpSubKey);
  92. STDAPI LocalAllocStringW(LPWSTR* ppResult, LPCWSTR pString);
  93. STDAPI LocalAllocStringLenW(LPWSTR* ppResult, UINT cLen);
  94. STDAPI_(VOID) LocalFreeStringW(LPWSTR* ppString);
  95. STDAPI LocalQueryStringW(LPWSTR* ppResult, HKEY hk, LPCTSTR lpSubKey);
  96. STDAPI LocalAllocStringA2W(LPWSTR* ppResult, LPCSTR pszString);
  97. STDAPI LocalAllocStringW2A(LPSTR* ppResult, LPCWSTR pszString);
  98. #ifndef UNICODE
  99. #define LocalAllocString LocalAllocStringA
  100. #define LocalAllocStringLen LocalAllocStringLenA
  101. #define LocalFreeString LocalFreeStringA
  102. #define LocalQueryString LocalQueryStringA
  103. #define LocalAllocStringA2T LocalAllocString
  104. #define LocalAllocStringW2T LocalAllocStringW2A
  105. #else
  106. #define LocalAllocString LocalAllocStringW
  107. #define LocalAllocStringLen LocalAllocStringLenW
  108. #define LocalFreeString LocalFreeStringW
  109. #define LocalQueryString LocalQueryStringW
  110. #define LocalAllocStringA2T LocalAllocStringA2W
  111. #define LocalAllocStringW2T LocalAllocString
  112. #endif
  113. STDAPI_(VOID) PutStringElementA(LPSTR pszBuffer, UINT* pLen, LPCSTR pszElement);
  114. STDAPI_(VOID) PutStringElementW(LPWSTR pszszBuffer, UINT* pLen, LPCWSTR pszElement);
  115. STDAPI GetStringElementA(LPSTR pszString, INT index, LPSTR pszBuffer, INT cchBuffer);
  116. STDAPI GetStringElementW(LPWSTR pszString, INT index, LPWSTR pszBuffer, INT cchBuffer);
  117. #ifndef UNICODE
  118. #define PutStringElement PutStringElementA
  119. #define GetStringElement GetStringElementA
  120. #else
  121. #define PutStringElement PutStringElementW
  122. #define GetStringElement GetStringElementW
  123. #endif
  124. //---------------------------------------------------------------------------//
  125. // Utility stuff common to dsfolder, dsquery etc
  126. //---------------------------------------------------------------------------//
  127. STDAPI_(INT) FormatMsgBox(HWND hWnd, HINSTANCE hInstance, UINT uidTitle, UINT uidPrompt, UINT uType, ...);
  128. STDAPI FormatMsgResource(LPTSTR* ppString, HINSTANCE hInstance, UINT uID, ...);
  129. STDAPI FormatDirectoryName(LPTSTR* ppString, HINSTANCE hInstance, UINT uID);
  130. STDAPI StringFromSearchColumn(PADS_SEARCH_COLUMN pColumn, LPWSTR* ppBuffer);
  131. STDAPI ObjectClassFromSearchColumn(PADS_SEARCH_COLUMN pColumn, LPWSTR* ppBuffer);
  132. typedef HRESULT (CALLBACK * LPGETARRAYCONTENTCB)(DWORD dwIndex, BSTR bstrValue, LPVOID pData);
  133. STDAPI GetArrayContents(LPVARIANT pVariant, LPGETARRAYCONTENTCB pCB, LPVOID pData);
  134. STDAPI GetDisplayNameFromADsPath(LPCWSTR pszszPath, LPWSTR pszszBuffer, INT cchBuffer, IADsPathname *padp, BOOL fPrefix);
  135. STDAPI_(DWORD) CheckDsPolicy(LPCTSTR pszSubKey, LPCTSTR pszValue);
  136. STDAPI_(BOOL) ShowDirectoryUI(VOID);
  137. #endif // GUID_DEFS_ONLY
  138. #endif