UserEnvUnloadUserProfile Method
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("UserEnv.dll", EntryPoint = "LoadUserProfile", CharSet = CharSet.Auto,
SetLastError = true)]
public static bool UnloadUserProfile(
IntPtr hToken,
IntPtr hProfile
)
<DllImportAttribute("UserEnv.dll", EntryPoint := "LoadUserProfile", CharSet := CharSet.Auto,
SetLastError := true>]
Public Shared Function UnloadUserProfile (
hToken As IntPtr,
hProfile As IntPtr
) As Boolean
Dim hToken As IntPtr
Dim hProfile As IntPtr
Dim returnValue As Boolean
returnValue = UserEnv.UnloadUserProfile(hToken,
hProfile)
public:
[DllImportAttribute(L"UserEnv.dll", EntryPoint = L"LoadUserProfile",
CharSet = CharSet::Auto, SetLastError = true)]
static bool UnloadUserProfile(
IntPtr hToken,
IntPtr hProfile
)
[<DllImportAttribute("UserEnv.dll", EntryPoint = "LoadUserProfile", CharSet = CharSet.Auto,
SetLastError = true)>]
static member UnloadUserProfile :
hToken : IntPtr *
hProfile : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hToken IntPtr
-
Token for the user, which is returned by the
LogonUser, CreateRestrictedToken, DuplicateToken(IntPtr, SecurityImpersonationLevel, IntPtr),
OpenProcessToken(SafeProcessHandle, TokenAccess, IntPtr), or OpenThreadToken(IntPtr, TokenAccess, Boolean, IntPtr) function.
The token must have Impersonate, and Duplicate access.
- hProfile IntPtr
-
Handle to the registry key.
This value is the RegistryHandle member.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.