mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
[OSK] Refactor the registry configuration code (#2096)
Rewrite LoadDataFromRegistry() and SaveDataToRegistry() as function helpers. With these, we'll be able to load and save data to registry on our choice.
This commit is contained in:
parent
8ec05f5fa1
commit
14ebc0ba3d
3 changed files with 125 additions and 228 deletions
|
@ -257,7 +257,7 @@ int OSK_DlgInitDialog(HWND hDlg)
|
||||||
*/
|
*/
|
||||||
VOID OSK_RestoreDlgPlacement(HWND hDlg)
|
VOID OSK_RestoreDlgPlacement(HWND hDlg)
|
||||||
{
|
{
|
||||||
LoadDataFromRegistry();
|
LoadSettings();
|
||||||
SetWindowPos(hDlg, (Globals.bAlwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST), Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE);
|
SetWindowPos(hDlg, (Globals.bAlwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST), Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,8 +282,8 @@ int OSK_DlgClose(void)
|
||||||
/* delete GDI objects */
|
/* delete GDI objects */
|
||||||
if (Globals.hBrushGreenLed) DeleteObject(Globals.hBrushGreenLed);
|
if (Globals.hBrushGreenLed) DeleteObject(Globals.hBrushGreenLed);
|
||||||
|
|
||||||
/* Save the settings to the registry hive */
|
/* Save the application's settings on registry */
|
||||||
SaveDataToRegistry();
|
SaveSettings();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -633,7 +633,7 @@ INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
Globals.bIsEnhancedKeyboard = TRUE;
|
Globals.bIsEnhancedKeyboard = TRUE;
|
||||||
EndDialog(hDlg, FALSE);
|
EndDialog(hDlg, FALSE);
|
||||||
SaveDataToRegistry();
|
SaveSettings();
|
||||||
|
|
||||||
/* Change the condition of enhanced keyboard item menu to checked */
|
/* Change the condition of enhanced keyboard item menu to checked */
|
||||||
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_CHECKED);
|
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_CHECKED);
|
||||||
|
@ -666,7 +666,7 @@ INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
Globals.bIsEnhancedKeyboard = FALSE;
|
Globals.bIsEnhancedKeyboard = FALSE;
|
||||||
EndDialog(hDlg, FALSE);
|
EndDialog(hDlg, FALSE);
|
||||||
SaveDataToRegistry();
|
SaveSettings();
|
||||||
|
|
||||||
/* Change the condition of standard keyboard item menu to checked */
|
/* Change the condition of standard keyboard item menu to checked */
|
||||||
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_UNCHECKED);
|
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_UNCHECKED);
|
||||||
|
@ -805,8 +805,8 @@ int WINAPI wWinMain(HINSTANCE hInstance,
|
||||||
ZeroMemory(&Globals, sizeof(Globals));
|
ZeroMemory(&Globals, sizeof(Globals));
|
||||||
Globals.hInstance = hInstance;
|
Globals.hInstance = hInstance;
|
||||||
|
|
||||||
/* Load the settings from the registry hive */
|
/* Load the application's settings from the registry */
|
||||||
LoadDataFromRegistry();
|
LoadSettings();
|
||||||
|
|
||||||
/* If the member of the struct (bShowWarning) is set then display the dialog box */
|
/* If the member of the struct (bShowWarning) is set then display the dialog box */
|
||||||
if (Globals.bShowWarning)
|
if (Globals.bShowWarning)
|
||||||
|
|
|
@ -68,11 +68,17 @@ LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw);
|
||||||
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
|
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
|
||||||
VOID OSK_RestoreDlgPlacement(HWND hDlg);
|
VOID OSK_RestoreDlgPlacement(HWND hDlg);
|
||||||
VOID OSK_RefreshLEDKeys(VOID);
|
VOID OSK_RefreshLEDKeys(VOID);
|
||||||
|
INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
/* settings.c */
|
/* settings.c */
|
||||||
BOOL LoadDataFromRegistry(VOID);
|
LONG LoadDataFromRegistry(IN LPCWSTR lpValueDataName,
|
||||||
BOOL SaveDataToRegistry(VOID);
|
OUT PDWORD pdwValueData);
|
||||||
INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
|
||||||
|
LONG SaveDataToRegistry(IN LPCWSTR lpValueDataName,
|
||||||
|
IN DWORD dwValueData);
|
||||||
|
|
||||||
|
VOID LoadSettings(VOID);
|
||||||
|
VOID SaveSettings(VOID);
|
||||||
|
|
||||||
/* DEFINES ********************************************************************/
|
/* DEFINES ********************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -11,24 +11,18 @@
|
||||||
|
|
||||||
/* FUNCTIONS *******************************************************************/
|
/* FUNCTIONS *******************************************************************/
|
||||||
|
|
||||||
BOOL LoadDataFromRegistry(VOID)
|
LONG LoadDataFromRegistry(IN LPCWSTR lpValueDataName,
|
||||||
|
OUT PDWORD pdwValueData)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
DWORD dwValue;
|
DWORD dwValue;
|
||||||
DWORD cbData = sizeof(dwValue);
|
DWORD cbData = sizeof(dwValue);
|
||||||
|
|
||||||
/* Initialize the registry application settings */
|
/* Initialize the pointer parameter to default */
|
||||||
Globals.bShowWarning = TRUE;
|
*pdwValueData = 0;
|
||||||
Globals.bIsEnhancedKeyboard = TRUE;
|
|
||||||
Globals.bSoundClick = FALSE;
|
|
||||||
Globals.bAlwaysOnTop = TRUE;
|
|
||||||
|
|
||||||
/* Set the coordinate values to default */
|
/* Open our application's key in order to load its configuration data */
|
||||||
Globals.PosX = CW_USEDEFAULT;
|
|
||||||
Globals.PosY = CW_USEDEFAULT;
|
|
||||||
|
|
||||||
/* Open the key, so that we can query it */
|
|
||||||
lResult = RegOpenKeyExW(HKEY_CURRENT_USER,
|
lResult = RegOpenKeyExW(HKEY_CURRENT_USER,
|
||||||
L"Software\\Microsoft\\Osk",
|
L"Software\\Microsoft\\Osk",
|
||||||
0,
|
0,
|
||||||
|
@ -37,133 +31,49 @@ BOOL LoadDataFromRegistry(VOID)
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
if (lResult != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
/* Bail out */
|
||||||
return FALSE;
|
DPRINT("LoadDataFromRegistry(): Failed to open the application's key! (Error - %li)\n", lResult);
|
||||||
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Query the key */
|
/* Load the specific value based on the parameter caller, lpValueDataName */
|
||||||
lResult = RegQueryValueExW(hKey,
|
lResult = RegQueryValueExW(hKey,
|
||||||
L"ShowWarning",
|
lpValueDataName,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
(BYTE *)&dwValue,
|
(BYTE *)&dwValue,
|
||||||
&cbData);
|
&cbData);
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
if (lResult != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
|
/* Bail out */
|
||||||
|
DPRINT("LoadDataFromRegistry(): Failed to load the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
return FALSE;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load the data value (it can be either FALSE or TRUE depending on the data itself) */
|
/* Is the buffer's size too small to query the required data? */
|
||||||
Globals.bShowWarning = (dwValue != 0);
|
if (cbData != sizeof(dwValue))
|
||||||
|
|
||||||
/* Query the key */
|
|
||||||
lResult = RegQueryValueExW(hKey,
|
|
||||||
L"IsEnhancedKeyboard",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
&cbData);
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
/* It is therefore bail out */
|
||||||
|
DPRINT("LoadDataFromRegistry(): The buffer is too small to hold the data!\n");
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
return FALSE;
|
return ERROR_MORE_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load the dialog layout value */
|
*pdwValueData = dwValue;
|
||||||
Globals.bIsEnhancedKeyboard = (dwValue != 0);
|
|
||||||
|
|
||||||
/* Query the key */
|
|
||||||
lResult = RegQueryValueExW(hKey,
|
|
||||||
L"ClickSound",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
&cbData);
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
return FALSE;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load the sound on click value event */
|
LONG SaveDataToRegistry(IN LPCWSTR lpValueDataName,
|
||||||
Globals.bSoundClick = (dwValue != 0);
|
IN DWORD dwValueData)
|
||||||
|
|
||||||
/* Query the key */
|
|
||||||
lResult = RegQueryValueExW(hKey,
|
|
||||||
L"WindowLeft",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
&cbData);
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load the X value data of the dialog's coordinate */
|
|
||||||
Globals.PosX = dwValue;
|
|
||||||
|
|
||||||
lResult = RegQueryValueExW(hKey,
|
|
||||||
L"WindowTop",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
&cbData);
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load the Y value data of the dialog's coordinate */
|
|
||||||
Globals.PosY = dwValue;
|
|
||||||
|
|
||||||
lResult = RegQueryValueExW(hKey,
|
|
||||||
L"AlwaysOnTop",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
&cbData);
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS || cbData != sizeof(dwValue))
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load the window state value data */
|
|
||||||
Globals.bAlwaysOnTop = (dwValue != 0);
|
|
||||||
|
|
||||||
/* If we're here then we succeed, close the key and return TRUE */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL SaveDataToRegistry(VOID)
|
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
DWORD dwValue;
|
|
||||||
WINDOWPLACEMENT wp;
|
|
||||||
|
|
||||||
/* Set the structure length and retrieve the dialog's placement */
|
/* Set up the application's key in case it has not been made yet */
|
||||||
wp.length = sizeof(WINDOWPLACEMENT);
|
|
||||||
GetWindowPlacement(Globals.hMainWnd, &wp);
|
|
||||||
|
|
||||||
/* If no key has been made, create one */
|
|
||||||
lResult = RegCreateKeyExW(HKEY_CURRENT_USER,
|
lResult = RegCreateKeyExW(HKEY_CURRENT_USER,
|
||||||
L"Software\\Microsoft\\Osk",
|
L"Software\\Microsoft\\Osk",
|
||||||
0,
|
0,
|
||||||
|
@ -176,119 +86,100 @@ BOOL SaveDataToRegistry(VOID)
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
if (lResult != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
/* Bail out */
|
||||||
return FALSE;
|
DPRINT("SaveDataToRegistry(): Failed to create the application's key! (Error - %li)\n", lResult);
|
||||||
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The data value of the subkey will be appended to the warning dialog switch */
|
/* Save the data into the registry value */
|
||||||
dwValue = Globals.bShowWarning;
|
|
||||||
|
|
||||||
/* Welcome warning box value key */
|
|
||||||
lResult = RegSetValueExW(hKey,
|
lResult = RegSetValueExW(hKey,
|
||||||
L"ShowWarning",
|
lpValueDataName,
|
||||||
0,
|
0,
|
||||||
REG_DWORD,
|
REG_DWORD,
|
||||||
(BYTE *)&dwValue,
|
(BYTE *)&dwValueData,
|
||||||
sizeof(dwValue));
|
sizeof(dwValueData));
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
if (lResult != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
/* Bail out */
|
||||||
|
DPRINT("SaveDataToRegistry(): Failed to save the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
return FALSE;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The value will be appended to the layout dialog */
|
RegCloseKey(hKey);
|
||||||
dwValue = Globals.bIsEnhancedKeyboard;
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keyboard dialog switcher */
|
VOID LoadSettings(VOID)
|
||||||
lResult = RegSetValueExW(hKey,
|
|
||||||
L"IsEnhancedKeyboard",
|
|
||||||
0,
|
|
||||||
REG_DWORD,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
sizeof(dwValue));
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
DWORD dwValue;
|
||||||
RegCloseKey(hKey);
|
LONG lResult;
|
||||||
return FALSE;
|
|
||||||
|
/* Initialize the registry application settings */
|
||||||
|
Globals.bShowWarning = TRUE;
|
||||||
|
Globals.bIsEnhancedKeyboard = TRUE;
|
||||||
|
Globals.bAlwaysOnTop = TRUE;
|
||||||
|
Globals.bSoundClick = FALSE;
|
||||||
|
|
||||||
|
/* Set the coordinate values to default */
|
||||||
|
Globals.PosX = CW_USEDEFAULT;
|
||||||
|
Globals.PosY = CW_USEDEFAULT;
|
||||||
|
|
||||||
|
/* Warning dialog registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"ShowWarning", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.bShowWarning = (dwValue != 0);
|
||||||
|
|
||||||
|
/* Enhanced keyboard switch dialog registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"IsEnhancedKeyboard", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.bIsEnhancedKeyboard = (dwValue != 0);
|
||||||
|
|
||||||
|
/* Sound on click event registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"ClickSound", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.bSoundClick = (dwValue != 0);
|
||||||
|
|
||||||
|
/* X coordinate dialog placement registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"WindowLeft", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.PosX = dwValue;
|
||||||
|
|
||||||
|
/* Y coordinate dialog placement registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"WindowTop", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.PosY = dwValue;
|
||||||
|
|
||||||
|
/* Top window state registry setting */
|
||||||
|
lResult = LoadDataFromRegistry(L"AlwaysOnTop", &dwValue);
|
||||||
|
if (lResult == NO_ERROR)
|
||||||
|
Globals.bAlwaysOnTop = (dwValue != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The value will be appended to the sound on click event */
|
VOID SaveSettings(VOID)
|
||||||
dwValue = Globals.bSoundClick;
|
|
||||||
|
|
||||||
/* "Sound on Click" switcher value key */
|
|
||||||
lResult = RegSetValueExW(hKey,
|
|
||||||
L"ClickSound",
|
|
||||||
0,
|
|
||||||
REG_DWORD,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
sizeof(dwValue));
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
|
||||||
{
|
{
|
||||||
/* Bail out and return FALSE if we fail */
|
WINDOWPLACEMENT wp;
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
/* Initialize the window placement structure */
|
||||||
}
|
wp.length = sizeof(WINDOWPLACEMENT);
|
||||||
|
GetWindowPlacement(Globals.hMainWnd, &wp);
|
||||||
/* The value will be appended to the X coordination dialog's placement */
|
|
||||||
dwValue = wp.rcNormalPosition.left;
|
/* Warning dialog registry setting */
|
||||||
|
SaveDataToRegistry(L"ShowWarning", Globals.bShowWarning);
|
||||||
/* Position X coordination of dialog's placement value key */
|
|
||||||
lResult = RegSetValueExW(hKey,
|
/* Enhanced keyboard switch dialog registry setting */
|
||||||
L"WindowLeft",
|
SaveDataToRegistry(L"IsEnhancedKeyboard", Globals.bIsEnhancedKeyboard);
|
||||||
0,
|
|
||||||
REG_DWORD,
|
/* Sound on click event registry setting */
|
||||||
(BYTE *)&dwValue,
|
SaveDataToRegistry(L"ClickSound", Globals.bSoundClick);
|
||||||
sizeof(dwValue));
|
|
||||||
|
/* X coordinate dialog placement registry setting */
|
||||||
if (lResult != ERROR_SUCCESS)
|
SaveDataToRegistry(L"WindowLeft", wp.rcNormalPosition.left);
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
/* Y coordinate dialog placement registry setting */
|
||||||
RegCloseKey(hKey);
|
SaveDataToRegistry(L"WindowTop", wp.rcNormalPosition.top);
|
||||||
return FALSE;
|
|
||||||
}
|
/* Top window state registry setting */
|
||||||
|
SaveDataToRegistry(L"AlwaysOnTop", Globals.bAlwaysOnTop);
|
||||||
/* The value will be appended to the Y coordination dialog's placement */
|
|
||||||
dwValue = wp.rcNormalPosition.top;
|
|
||||||
|
|
||||||
/* Position Y coordination of dialog's placement value key */
|
|
||||||
lResult = RegSetValueExW(hKey,
|
|
||||||
L"WindowTop",
|
|
||||||
0,
|
|
||||||
REG_DWORD,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
sizeof(dwValue));
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Window top state value */
|
|
||||||
dwValue = Globals.bAlwaysOnTop;
|
|
||||||
|
|
||||||
/* "Always on Top" state value key */
|
|
||||||
lResult = RegSetValueExW(hKey,
|
|
||||||
L"AlwaysOnTop",
|
|
||||||
0,
|
|
||||||
REG_DWORD,
|
|
||||||
(BYTE *)&dwValue,
|
|
||||||
sizeof(dwValue));
|
|
||||||
|
|
||||||
if (lResult != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
/* Bail out and return FALSE if we fail */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we're here then we succeed, close the key and return TRUE */
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue