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.

79 lines
3.4 KiB

  1. //*************************************************************
  2. // File name: UTIL.H
  3. //
  4. // Description: Header file for util.cpp
  5. //
  6. //
  7. // Microsoft Confidential
  8. // Copyright (c) Microsoft Corporation 1998
  9. // All rights reserved
  10. //
  11. //*************************************************************
  12. #define GUID_LEN 38
  13. LPTSTR CheckSlash (LPTSTR lpDir);
  14. UINT CreateNestedDirectory(LPCTSTR lpDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  15. VOID LoadMessage (DWORD dwID, LPTSTR lpBuffer, DWORD dwSize);
  16. BOOL ReportError (HWND hParent, DWORD dwError, UINT idMsg, ...);
  17. void SetWaitCursor (void);
  18. void ClearWaitCursor (void);
  19. BOOL Delnode (LPTSTR lpDir);
  20. BOOL StringToNum(TCHAR *pszStr,UINT * pnVal);
  21. HRESULT DSDelnode (LPTSTR lpDSPath);
  22. UINT CreateSecureDirectory (LPTSTR lpDirectory);
  23. HRESULT ConvertToDotStyle (LPOLESTR lpName, LPOLESTR *lpResult);
  24. LPOLESTR GetDomainFromLDAPPath(LPOLESTR szIn);
  25. LPOLESTR GetContainerFromLDAPPath(LPOLESTR szIn);
  26. #define VALIDATE_INHERIT_DC 1
  27. LPTSTR GetDCName (LPTSTR lpDomainName, LPTSTR lpInheritServer, HWND hParent, BOOL bAllowUI, DWORD dwFlags, ULONG ulRetFlags = 0);
  28. LPTSTR MyGetUserName (EXTENDED_NAME_FORMAT NameFormat);
  29. void StringToGuid( TCHAR *szValue, GUID *pGuid );
  30. void GuidToString( GUID *pGuid, TCHAR * szValue );
  31. BOOL ValidateGuid( TCHAR *szValue );
  32. INT CompareGuid( GUID *pGuid1, GUID *pGuid2 );
  33. BOOL IsNullGUID (GUID *pguid);
  34. BOOL SpawnGPE (LPTSTR lpGPO, GROUP_POLICY_HINT_TYPE gpHint, LPTSTR lpDC, HWND hParent);
  35. LPTSTR MakeFullPath (LPTSTR lpDN, LPTSTR lpServer);
  36. LPTSTR MakeNamelessPath (LPTSTR lpDN);
  37. LPTSTR ExtractServerName (LPTSTR lpPath);
  38. BOOL DoesPathContainAServerName (LPTSTR lpPath);
  39. HRESULT OpenDSObject (LPTSTR lpPath, REFIID riid, void FAR * FAR * ppObject);
  40. HRESULT CheckDSWriteAccess (LPUNKNOWN punk, LPTSTR lpProperty);
  41. VOID FreeDCSelections (void);
  42. LPTSTR GetFullGPOPath (LPTSTR lpGPO, HWND hParent);
  43. DWORD GetDCHelper (LPTSTR lpDomainName, ULONG ulFlags, LPTSTR *lpDCName);
  44. LPTSTR ConvertName (LPTSTR lpName);
  45. LPTSTR CreateTempFile (void);
  46. DWORD QueryForForestName (LPTSTR lpServerName, LPTSTR lpDomainName, ULONG ulFlags, LPTSTR *lpForestFound);
  47. void NameToPath(WCHAR * szPath, WCHAR *szName, UINT cch);
  48. LPTSTR GetPathToForest(LPOLESTR szServer);
  49. BOOL IsForest(LPOLESTR szLDAPPath);
  50. BOOL IsStandaloneComputer (VOID);
  51. BOOL GetNewGPODisplayName (LPTSTR lpDisplayName, DWORD dwDisplayNameSize);
  52. BOOL GetWMIFilter (BOOL bBrowser, HWND hwndParent, BOOL bDSFormat,
  53. LPTSTR *lpDisplayName, LPTSTR * lpFilter, BSTR bstrDomain );
  54. LPTSTR GetWMIFilterDisplayName (HWND hParent, LPTSTR lpFilter, BOOL bDSFormat, BOOL bRetRsopFormat);
  55. HRESULT SaveString(IStream *pStm, LPTSTR lpString);
  56. HRESULT ReadString(IStream *pStm, LPTSTR *lpString, BOOL bUseLocalAlloc = FALSE);
  57. BOOL GetSiteFriendlyName (LPWSTR szSitePath, LPWSTR *pszSiteName );
  58. DWORD MapSecurityRights (PACL pAcl);
  59. extern "C" {
  60. DWORD SetSysvolSecurityFromDSSecurity (LPTSTR lpFileSysPath, SECURITY_INFORMATION si,
  61. PSECURITY_DESCRIPTOR pSD);
  62. }
  63. BOOL GetStringSid(LPTSTR szSamName, LPTSTR *szStringSid);
  64. BOOL GetUserNameFromStringSid(LPTSTR szStringSid, LPTSTR *szSamName);
  65. HRESULT UnEscapeLdapPath(LPWSTR szDN, LPWSTR *pszUnEscapedPath);
  66. #if !defined(_WIN64)
  67. bool IsWin64();
  68. #endif // _WIN64
  69. //
  70. // Length in chars of string form of guid {44cffeec-79d0-11d2-a89d-00c04fbbcfa2}
  71. //
  72. #define GUID_LENGTH 38