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.

89 lines
3.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: util.h
  8. //
  9. // miscellaneous utility functions
  10. //
  11. //--------------------------------------------------------------------------
  12. #ifndef _UTIL_H_
  13. #define _UTIL_H_
  14. STDMETHODIMP
  15. IDA_BindToFolder(LPIDA pIDA, LPSHELLFOLDER *ppsf);
  16. STDMETHODIMP
  17. IDA_GetItemName(LPSHELLFOLDER psf,
  18. LPCITEMIDLIST pidl,
  19. LPTSTR pszName,
  20. UINT cchName,
  21. SHGNO uFlags = SHGDN_FORPARSING);
  22. STDMETHODIMP
  23. IDA_GetItemName(LPSHELLFOLDER psf,
  24. LPCITEMIDLIST pidl,
  25. LPTSTR *ppszName,
  26. SHGNO uFlags = SHGDN_FORPARSING);
  27. typedef DWORD (WINAPI *PFN_READ_SD)(LPCTSTR pszItemName,
  28. SECURITY_INFORMATION si,
  29. PSECURITY_DESCRIPTOR* ppSD);
  30. STDMETHODIMP
  31. DPA_CompareSecurityIntersection(HDPA hItemList,
  32. PFN_READ_SD pfnReadSD,
  33. BOOL *pfOwnerConflict,
  34. BOOL *pfGroupConflict,
  35. BOOL *pfSACLConflict,
  36. BOOL *pfDACLConflict,
  37. LPTSTR *ppszOwnerConflict,
  38. LPTSTR *ppszGroupConflict,
  39. LPTSTR *ppszSaclConflict,
  40. LPTSTR *ppszDaclConflict,
  41. LPBOOL pbCancel);
  42. STDMETHODIMP
  43. GetRemotePath(LPCTSTR pszInName, LPTSTR *ppszOutName);
  44. void
  45. LocalFreeDPA(HDPA hList);
  46. BOOL
  47. IsSafeMode(void);
  48. BOOL
  49. IsGuestAccessMode(void);
  50. BOOL
  51. IsSimpleUI(void);
  52. BOOL
  53. IsUIHiddenByPrivacyPolicy(void);
  54. HRESULT BindToObjectEx(IShellFolder *psf, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv);
  55. HRESULT BindToFolderIDListParent(IShellFolder *psfRoot, LPCITEMIDLIST pidl, REFIID riid, void **ppv, LPCITEMIDLIST *ppidlLast);
  56. //+----------------------------------------------------------------------------
  57. // Function:SetAclOnRemoteNetworkDrive
  58. // Synopsis: If Z: is a mapped drive( mapped to \\machineA\share), when
  59. // we set DACL/SACL on Z:, Security API's cannot determine
  60. // the parent of "share" on machineA and so we lose all the
  61. // inherited aces. All UI can do is to detect such cases and
  62. // show a warning. Thats what this function does.
  63. // Arguments:hItemList List of items on which security is going to be set
  64. // si: SECURITY_INFORMATION
  65. // pSD: Security Descriptor to be set
  66. // hWndPopupOwner: Owner window for message box
  67. // Returns:
  68. // NTRAID#NTBUG9-581195-2002/03/26-hiteshr
  69. // NOTES:Since this fix is XPSP1, resources are going to be loaded from
  70. // xpsp1res.dll
  71. //-----------------------------------------------------------------------------
  72. BOOL SetAclOnRemoteNetworkDrive(HDPA hItemList,
  73. SECURITY_INFORMATION si,
  74. PSECURITY_DESCRIPTOR pSD,
  75. HWND hWndPopupOwner);
  76. #endif /* _UTIL_H_ */