advapi32 topic
Advanced Base API Library
Implements Windows API functions related to the Windows registry, services, user accounts and applications.
Functions
-
CredDelete(
Pointer< advapi32Utf16> TargetName, int Type, int Flags) → int - The CredDelete function deletes a credential from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.
-
CredFree(
Pointer< advapi32NativeType> Buffer) → void - The CredFree function frees a buffer returned by any of the credentials management functions.
-
CredRead(
Pointer< advapi32Utf16> TargetName, int Type, int Flags, Pointer<Pointer< Credential) → intCREDENTIAL> > - The CredRead function reads a credential from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.
-
CredWrite(
Pointer< advapi32CREDENTIAL> Credential, int Flags) → int - The CredWrite function creates a new credential or modifies an existing credential in the user's credential set. The new credential is associated with the logon session of the current token. The token must not have the user's security identifier (SID) disabled.
-
DecryptFile(
Pointer< advapi32Utf16> lpFileName, int dwReserved) → int - Decrypts an encrypted file or directory.
-
EncryptFile(
Pointer< advapi32Utf16> lpFileName) → int - Encrypts a file or directory. All data streams in a file are encrypted. All new files created in an encrypted directory are encrypted.
-
FileEncryptionStatus(
Pointer< advapi32Utf16> lpFileName, Pointer<Uint32> lpStatus) → int - Retrieves the encryption status of the specified file.
-
GetCurrentProcessToken(
) → int advapi32 - Retrieves a pseudo-handle that you can use as a shorthand way to refer to the access token associated with a process.
-
GetCurrentThreadEffectiveToken(
) → int advapi32 - Retrieves a pseudo-handle that you can use as a shorthand way to refer to the impersonation token that was assigned to the current thread.
-
GetCurrentThreadToken(
) → int advapi32 - Retrieves a pseudo-handle that you can use as a shorthand way to refer to the impersonation token that was assigned to the current thread.
-
GetTokenInformation(
int TokenHandle, int TokenInformationClass, Pointer< advapi32NativeType> TokenInformation, int TokenInformationLength, Pointer<Uint32> ReturnLength) → int - The GetTokenInformation function retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.
-
GetUserName(
Pointer< advapi32Utf16> lpBuffer, Pointer<Uint32> pcbBuffer) → int - Retrieves the name of the user associated with the current thread.
-
InitiateShutdown(
Pointer< advapi32Utf16> lpMachineName, Pointer<Utf16> lpMessage, int dwGracePeriod, int dwShutdownFlags, int dwReason) → int - Initiates a shutdown and restart of the specified computer, and restarts any applications that have been registered for restart.
-
OpenProcessToken(
int ProcessHandle, int DesiredAccess, Pointer< advapi32IntPtr> TokenHandle) → int - The OpenProcessToken function opens the access token associated with a process.
-
OpenThreadToken(
int ThreadHandle, int DesiredAccess, int OpenAsSelf, Pointer< advapi32IntPtr> TokenHandle) → int - The OpenThreadToken function opens the access token associated with a thread.
-
RegCloseKey(
int hKey) → int advapi32 - Closes a handle to the specified registry key.
-
RegConnectRegistry(
Pointer< advapi32Utf16> lpMachineName, int hKey, Pointer<IntPtr> phkResult) → int - Establishes a connection to a predefined registry key on another computer.
-
RegCopyTree(
int hKeySrc, Pointer< advapi32Utf16> lpSubKey, int hKeyDest) → int - Copies the specified registry key, along with its values and subkeys, to the specified destination key.
-
RegCreateKey(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<IntPtr> phkResult) → int - Creates the specified registry key. If the key already exists in the registry, the function opens it.
-
RegCreateKeyEx(
int hKey, Pointer< advapi32Utf16> lpSubKey, int Reserved, Pointer<Utf16> lpClass, int dwOptions, int samDesired, Pointer<SECURITY_ATTRIBUTES> lpSecurityAttributes, Pointer<IntPtr> phkResult, Pointer<Uint32> lpdwDisposition) → int - Creates the specified registry key. If the key already exists, the function opens it. Note that key names are not case sensitive.
-
RegCreateKeyTransacted(
int hKey, Pointer< advapi32Utf16> lpSubKey, int Reserved, Pointer<Utf16> lpClass, int dwOptions, int samDesired, Pointer<SECURITY_ATTRIBUTES> lpSecurityAttributes, Pointer<IntPtr> phkResult, Pointer<Uint32> lpdwDisposition, int hTransaction, Pointer<NativeType> pExtendedParemeter) → int - Establishes a connection to a predefined registry key on another computer.
-
RegDeleteKey(
int hKey, Pointer< advapi32Utf16> lpSubKey) → int - Deletes a subkey and its values. Note that key names are not case sensitive.
-
RegDeleteKeyEx(
int hKey, Pointer< advapi32Utf16> lpSubKey, int samDesired, int Reserved) → int - Deletes a subkey and its values from the specified platform-specific view of the registry. Note that key names are not case sensitive.
-
RegDeleteKeyTransacted(
int hKey, Pointer< advapi32Utf16> lpSubKey, int samDesired, int Reserved, int hTransaction, Pointer<NativeType> pExtendedParameter) → int - Deletes a subkey and its values from the specified platform-specific view of the registry as a transacted operation. Note that key names are not case sensitive.
-
RegDeleteKeyValue(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpValueName) → int - Removes the specified value from the specified registry key and subkey.
-
RegDeleteTree(
int hKey, Pointer< advapi32Utf16> lpSubKey) → int - Deletes the subkeys and values of the specified key recursively.
-
RegDeleteValue(
int hKey, Pointer< advapi32Utf16> lpValueName) → int - Removes a named value from the specified registry key. Note that value names are not case sensitive.
-
RegDisablePredefinedCache(
) → int advapi32 - Disables handle caching of the predefined registry handle for HKEY_CURRENT_USER for the current process. This function does not work on a remote computer.
-
RegDisablePredefinedCacheEx(
) → int advapi32 - Disables handle caching for all predefined registry handles for the current process.
-
RegDisableReflectionKey(
int hBase) → int advapi32 - Disables registry reflection for the specified key. Disabling reflection for a key does not affect reflection of any subkeys.
-
RegEnableReflectionKey(
int hBase) → int advapi32 - Restores registry reflection for the specified disabled key. Restoring reflection for a key does not affect reflection of any subkeys.
-
RegEnumKey(
int hKey, int dwIndex, Pointer< advapi32Utf16> lpName, int cchName) → int - Enumerates the subkeys of the specified open registry key. The function retrieves the name of one subkey each time it is called.
-
RegEnumKeyEx(
int hKey, int dwIndex, Pointer< advapi32Utf16> lpName, Pointer<Uint32> lpcchName, Pointer<Uint32> lpReserved, Pointer<Utf16> lpClass, Pointer<Uint32> lpcchClass, Pointer<FILETIME> lpftLastWriteTime) → int - Enumerates the subkeys of the specified open registry key. The function retrieves information about one subkey each time it is called.
-
RegEnumValue(
int hKey, int dwIndex, Pointer< advapi32Utf16> lpValueName, Pointer<Uint32> lpcchValueName, Pointer<Uint32> lpReserved, Pointer<Uint32> lpType, Pointer<Uint8> lpData, Pointer<Uint32> lpcbData) → int - Enumerates the values for the specified open registry key. The function copies one indexed value name and data block for the key each time it is called.
-
RegFlushKey(
int hKey) → int advapi32 - Writes all the attributes of the specified open registry key into the registry.
-
RegGetValue(
int hkey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpValue, int dwFlags, Pointer<Uint32> pdwType, Pointer<NativeType> pvData, Pointer<Uint32> pcbData) → int - Retrieves the type and data for the specified registry value.
-
RegLoadAppKey(
Pointer< advapi32Utf16> lpFile, Pointer<IntPtr> phkResult, int samDesired, int dwOptions, int Reserved) → int - Loads the specified registry hive as an application hive.
-
RegLoadKey(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpFile) → int - Creates a subkey under HKEY_USERS or HKEY_LOCAL_MACHINE and loads the data from the specified registry hive into that subkey.
-
RegLoadMUIString(
int hKey, Pointer< advapi32Utf16> pszValue, Pointer<Utf16> pszOutBuf, int cbOutBuf, Pointer<Uint32> pcbData, int Flags, Pointer<Utf16> pszDirectory) → int - Loads the specified string from the specified key and subkey.
-
RegNotifyChangeKeyValue(
int hKey, int bWatchSubtree, int dwNotifyFilter, int hEvent, int fAsynchronous) → int advapi32 - Notifies the caller about changes to the attributes or contents of a specified registry key.
-
RegOpenCurrentUser(
int samDesired, Pointer< advapi32IntPtr> phkResult) → int - Retrieves a handle to the HKEY_CURRENT_USER key for the user the current thread is impersonating.
-
RegOpenKey(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<IntPtr> phkResult) → int - Opens the specified registry key.
-
RegOpenKeyEx(
int hKey, Pointer< advapi32Utf16> lpSubKey, int ulOptions, int samDesired, Pointer<IntPtr> phkResult) → int - Opens the specified registry key. Note that key names are not case sensitive.
-
RegOpenKeyTransacted(
int hKey, Pointer< advapi32Utf16> lpSubKey, int ulOptions, int samDesired, Pointer<IntPtr> phkResult, int hTransaction, Pointer<NativeType> pExtendedParemeter) → int - Opens the specified registry key and associates it with a transaction. Note that key names are not case sensitive.
-
RegOpenUserClassesRoot(
int hToken, int dwOptions, int samDesired, Pointer< advapi32IntPtr> phkResult) → int - Retrieves a handle to the HKEY_CLASSES_ROOT key for a specified user. The user is identified by an access token.
-
RegOverridePredefKey(
int hKey, int hNewHKey) → int advapi32 - Maps a predefined registry key to the specified registry key.
-
RegQueryInfoKey(
int hKey, Pointer< advapi32Utf16> lpClass, Pointer<Uint32> lpcchClass, Pointer<Uint32> lpReserved, Pointer<Uint32> lpcSubKeys, Pointer<Uint32> lpcbMaxSubKeyLen, Pointer<Uint32> lpcbMaxClassLen, Pointer<Uint32> lpcValues, Pointer<Uint32> lpcbMaxValueNameLen, Pointer<Uint32> lpcbMaxValueLen, Pointer<Uint32> lpcbSecurityDescriptor, Pointer<FILETIME> lpftLastWriteTime) → int - Retrieves information about the specified registry key.
-
RegQueryMultipleValues(
int hKey, Pointer< advapi32VALENT> val_list, int num_vals, Pointer<Utf16> lpValueBuf, Pointer<Uint32> ldwTotsize) → int - Retrieves the type and data for a list of value names associated with an open registry key.
-
RegQueryReflectionKey(
int hBase, Pointer< advapi32Int32> bIsReflectionDisabled) → int - Determines whether reflection has been disabled or enabled for the specified key.
-
RegQueryValue(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpData, Pointer<Int32> lpcbData) → int - Retrieves the data associated with the default or unnamed value of a specified registry key. The data must be a null-terminated string.
-
RegQueryValueEx(
int hKey, Pointer< advapi32Utf16> lpValueName, Pointer<Uint32> lpReserved, Pointer<Uint32> lpType, Pointer<Uint8> lpData, Pointer<Uint32> lpcbData) → int - Retrieves the type and data for the specified value name associated with an open registry key. To ensure that any string values (REG_SZ, REG_MULTI_SZ, and REG_EXPAND_SZ) returned are null-terminated, use the RegGetValue function.
-
RegRenameKey(
int hKey, Pointer< advapi32Utf16> lpSubKeyName, Pointer<Utf16> lpNewKeyName) → int - Changes the name of the specified registry key.
-
RegReplaceKey(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpNewFile, Pointer<Utf16> lpOldFile) → int - Replaces the file backing a registry key and all its subkeys with another file, so that when the system is next started, the key and subkeys will have the values stored in the new file.
-
RegRestoreKey(
int hKey, Pointer< advapi32Utf16> lpFile, int dwFlags) → int - Reads the registry information in a specified file and copies it over the specified key. This registry information may be in the form of a key and multiple levels of subkeys.
-
RegSaveKey(
int hKey, Pointer< advapi32Utf16> lpFile, Pointer<SECURITY_ATTRIBUTES> lpSecurityAttributes) → int - Saves the specified key and all of its subkeys and values to a new file, in the standard format.
-
RegSaveKeyEx(
int hKey, Pointer< advapi32Utf16> lpFile, Pointer<SECURITY_ATTRIBUTES> lpSecurityAttributes, int Flags) → int - Saves the specified key and all of its subkeys and values to a registry file, in the specified format.
-
RegSetKeyValue(
int hKey, Pointer< advapi32Utf16> lpSubKey, Pointer<Utf16> lpValueName, int dwType, Pointer<NativeType> lpData, int cbData) → int - Sets the data for the specified value in the specified registry key and subkey.
-
RegSetValue(
int hKey, Pointer< advapi32Utf16> lpSubKey, int dwType, Pointer<Utf16> lpData, int cbData) → int - Sets the data for the default or unnamed value of a specified registry key. The data must be a text string.
-
RegSetValueEx(
int hKey, Pointer< advapi32Utf16> lpValueName, int Reserved, int dwType, Pointer<Uint8> lpData, int cbData) → int - Sets the data and type of a specified value under a registry key.
-
RegUnLoadKey(
int hKey, Pointer< advapi32Utf16> lpSubKey) → int - Unloads the specified registry key and its subkeys from the registry.
-
SetThreadToken(
Pointer< advapi32IntPtr> Thread, int Token) → int - The SetThreadToken function assigns an impersonation token to a thread. The function can also cause a thread to stop using an impersonation token.