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.

101 lines
2.5 KiB

  1. //=============================================================================
  2. // profmapp.h - Header file for user remap API.
  3. //
  4. // Copyright (c) Microsoft Corporation 1995-1999
  5. // All rights reserved
  6. //
  7. //=============================================================================
  8. //=============================================================================
  9. //
  10. // RemapUserProfile
  11. //
  12. // Changes the security of a user profile from one user to another.
  13. //
  14. // pComputer - Specifies the computer to run the API on
  15. // dwFlags - Specifies zero or more REMAP_PROFILE_* flags
  16. // pCurrentSid - Specifies the existing user's SID
  17. // pNewSid - Specifies the new SID for the profile
  18. //
  19. // Returns: TRUE if successful
  20. // FALSE if not.
  21. //
  22. //=============================================================================
  23. #define REMAP_PROFILE_NOOVERWRITE 0x0001
  24. #define REMAP_PROFILE_NOUSERNAMECHANGE 0x0002
  25. #define REMAP_PROFILE_KEEPLOCALACCOUNT 0x0004
  26. USERENVAPI
  27. BOOL
  28. WINAPI
  29. RemapUserProfileA(
  30. LPCSTR pComputer,
  31. DWORD dwFlags,
  32. PSID pSidCurrent,
  33. PSID pSidNew
  34. );
  35. USERENVAPI
  36. BOOL
  37. WINAPI
  38. RemapUserProfileW(
  39. LPCWSTR pComputer,
  40. DWORD dwFlags,
  41. PSID pSidCurrent,
  42. PSID pSidNew
  43. );
  44. #ifdef UNICODE
  45. #define RemapUserProfile RemapUserProfileW
  46. #else
  47. #define RemapUserProfile RemapUserProfileA
  48. #endif // !UNICODE
  49. BOOL
  50. WINAPI
  51. InitializeProfileMappingApi (
  52. VOID
  53. );
  54. //=============================================================================
  55. //
  56. // RemapAndMoveUser
  57. //
  58. // Transfers security settings and the user profile for one user to
  59. // another.
  60. //
  61. // pComputer - Specifies the computer to run the API on
  62. // dwFlags - Specifies zero or mor REMAP_PROFILE_* flags
  63. // pCurrentUser - Specifies the existing user's SID
  64. // pNewUser - Specifies the new SID for the profile
  65. //
  66. // Returns: TRUE if successful
  67. // FALSE if not.
  68. //
  69. //=============================================================================
  70. USERENVAPI
  71. BOOL
  72. WINAPI
  73. RemapAndMoveUserA(
  74. LPCSTR pComputer,
  75. DWORD dwFlags,
  76. LPCSTR pCurrentUser,
  77. LPCSTR pNewUser
  78. );
  79. USERENVAPI
  80. BOOL
  81. WINAPI
  82. RemapAndMoveUserW(
  83. LPCWSTR pComputer,
  84. DWORD dwFlags,
  85. LPCWSTR pCurrentUser,
  86. LPCWSTR pNewUser
  87. );
  88. #ifdef UNICODE
  89. #define RemapAndMoveUser RemapAndMoveUserW
  90. #else
  91. #define RemapAndMoveUser RemapAndMoveUserA
  92. #endif // !UNICODE