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.

107 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. utils.hxx
  6. Abstract:
  7. utils
  8. Author:
  9. Larry Zhu (LZhu) December 1, 2001 Created
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. --*/
  14. #ifndef UTILS_HXX
  15. #define UTILS_HXX
  16. NTSTATUS
  17. CreateUnicodeStringFromAsciiz(
  18. IN PCSZ pszSourceString,
  19. OUT UNICODE_STRING* pDestinationString
  20. );
  21. VOID
  22. PackStringAsString32(
  23. IN VOID* pvBufferBase,
  24. IN OUT STRING* pString
  25. );
  26. NTSTATUS
  27. CreateString32FromAsciiz(
  28. IN VOID* pvBufferBase,
  29. IN PCSZ pszSourceString,
  30. OUT UNICODE_STRING* pDestinationString
  31. );
  32. VOID
  33. ReloatePackString(
  34. IN OUT STRING* pString,
  35. IN OUT CHAR** ppWhere
  36. );
  37. VOID
  38. RelocatePackUnicodeString(
  39. IN OUT UNICODE_STRING* pString,
  40. IN OUT CHAR** ppWhere
  41. );
  42. VOID
  43. DebugPrintSysTimeAsLocalTime(
  44. IN ULONG ulLevel,
  45. IN PCSTR pszBanner,
  46. IN LARGE_INTEGER* pSysTime
  47. );
  48. VOID
  49. PackUnicodeStringAsUnicodeStringZ(
  50. IN UNICODE_STRING* pString,
  51. IN OUT WCHAR** ppWhere,
  52. OUT UNICODE_STRING* pDestString
  53. );
  54. VOID
  55. PackString(
  56. IN STRING* pString,
  57. IN OUT CHAR** ppWhere,
  58. OUT STRING* pDestString
  59. );
  60. VOID
  61. DebugPrintLocalTime(
  62. IN ULONG ulLevel,
  63. IN PCSTR pszBanner,
  64. IN LARGE_INTEGER* pLocalTime
  65. );
  66. VOID FreeLogonSID(IN PSID *ppsid);
  67. BOOL GetLogonSIDOrUserSid(IN HANDLE hToken, OUT PSID *ppsid);
  68. BOOL AddAceToDesktop(IN HDESK hdesk, IN PSID psid);
  69. BOOL AddAceToWindowStation(IN HWINSTA hwinsta, IN PSID psid);
  70. HRESULT
  71. StartInteractiveClientProcessAsUser(
  72. IN HANDLE hToken,
  73. IN PTSTR pszCommandLine // command line to execute
  74. );
  75. BOOL
  76. BuildNamedPipeAcl(
  77. IN OUT PACL pAcl,
  78. OUT PDWORD pcbAclSize
  79. );
  80. #endif // #ifndef UTILS_HXX