advpack: Forward RegSaveRestoreA to its Unicode counterpart.

This commit is contained in:
James Hawkins 2006-04-03 12:04:21 -05:00 committed by Alexandre Julliard
parent 063a36b66f
commit 96a428066a
2 changed files with 35 additions and 4 deletions

View File

@ -56,7 +56,7 @@
@ stdcall RegRestoreAllW(ptr wstr long)
@ stdcall RegRestoreAll(ptr str long) RegRestoreAllA
@ stdcall RegSaveRestoreA(ptr str long str str str long)
# stdcall RegSaveRestoreW(ptr wstr long wstr wstr wstr long)
@ stdcall RegSaveRestoreW(ptr wstr long wstr wstr wstr long)
@ stdcall RegSaveRestore(ptr str long str str str long) RegSaveRestoreA
@ stdcall RegSaveRestoreOnINFA(ptr str str str long long long)
# stdcall RegSaveRestoreOnINFW(ptr wstr wstr wstr long long long)

View File

@ -236,6 +236,37 @@ HRESULT WINAPI RegRestoreAllW(HWND hWnd, LPWSTR pszTitleString, HKEY hkBackupKey
/***********************************************************************
* RegSaveRestoreA (advpack.@)
*
* See RegSaveRestoreW.
*/
HRESULT WINAPI RegSaveRestoreA(HWND hWnd, LPCSTR pszTitleString, HKEY hkBackupKey,
LPCSTR pcszRootKey, LPCSTR pcszSubKey,
LPCSTR pcszValueName, DWORD dwFlags)
{
UNICODE_STRING title, root, subkey, value;
HRESULT hr;
TRACE("(%p, %p, %p, %p, %p, %p, %ld)\n", hWnd, pszTitleString,
hkBackupKey, pcszRootKey, pcszSubKey, pcszValueName, dwFlags);
RtlCreateUnicodeStringFromAsciiz(&title, pszTitleString);
RtlCreateUnicodeStringFromAsciiz(&root, pcszRootKey);
RtlCreateUnicodeStringFromAsciiz(&subkey, pcszSubKey);
RtlCreateUnicodeStringFromAsciiz(&value, pcszValueName);
hr = RegSaveRestoreW(hWnd, title.Buffer, hkBackupKey, root.Buffer,
subkey.Buffer, value.Buffer, dwFlags);
RtlFreeUnicodeString(&title);
RtlFreeUnicodeString(&root);
RtlFreeUnicodeString(&subkey);
RtlFreeUnicodeString(&value);
return hr;
}
/***********************************************************************
* RegSaveRestoreW (advpack.@)
*
* Saves or restores the specified registry value.
*
* PARAMS
@ -254,9 +285,9 @@ HRESULT WINAPI RegRestoreAllW(HWND hWnd, LPWSTR pszTitleString, HKEY hkBackupKey
* BUGS
* Unimplemented.
*/
HRESULT WINAPI RegSaveRestoreA(HWND hWnd, LPCSTR pszTitleString, HKEY hkBackupKey,
LPCSTR pcszRootKey, LPCSTR pcszSubKey,
LPCSTR pcszValueName, DWORD dwFlags)
HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupKey,
LPCWSTR pcszRootKey, LPCWSTR pcszSubKey,
LPCWSTR pcszValueName, DWORD dwFlags)
{
FIXME("(%p, %p, %p, %p, %p, %p, %ld) stub\n", hWnd, pszTitleString,
hkBackupKey, pcszRootKey, pcszSubKey, pcszValueName, dwFlags);