GetRegistryValue method


Syntax

Invoke GetRegistryValue, hKey, lpszSubKey, lpszValueName, lpszValue

Function

Retrieves the data of the specified named value from the specified registry subkey.

Parameters

hKey

Handle to one of the following predefined keys:

ecClassesRoot
ecCurrentUser
ecLocalMachine
ecUsers
ecPerformanceData
ecCurrentConfig
ecDynData

lpszSubKey

Pointer to the effective address of a null-terminated string that names the path of the subkey containing the named value whose value is to be retrieved.

lpszValueName

Pointer to the effective address of a null-terminated string that names the named value whose value is to be retrieved.

lpszValue

Pointer to the effective address of a null-terminated string to receive the retrieved value.

Return value

Eax returns TRUE if succesful, or FALSE if not.


REMARKS: The lpszValue parameter points to a null-terminated string to receive the retrieved data. You can fill this parameter with the desired default value before calling the method, as it will return the same value if the specified named value is not found.

IMPORTANT: The string pointed by lpszValue must be able to allocate up to MAX_PATH characters.