From 844eebd0e764901117f79c0e0dd6bdf828bba3ce Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 3 Apr 2006 12:04:32 -0500 Subject: [PATCH] advpack: Forward RegSaveRestoreOnINFA to its Unicode counterpart. --- dlls/advpack/advpack.spec | 2 +- dlls/advpack/reg.c | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dlls/advpack/advpack.spec b/dlls/advpack/advpack.spec index 5964403ab50..7dd0bb4a2b5 100644 --- a/dlls/advpack/advpack.spec +++ b/dlls/advpack/advpack.spec @@ -59,7 +59,7 @@ @ 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) +@ stdcall RegSaveRestoreOnINFW(ptr wstr wstr wstr long long long) @ stdcall RegSaveRestoreOnINF(ptr str str str long long long) RegSaveRestoreOnINFA @ stdcall RegisterOCX(ptr ptr str long) @ stdcall RunSetupCommandA(long str str str str ptr long ptr) diff --git a/dlls/advpack/reg.c b/dlls/advpack/reg.c index 270a9df8a89..7784dc7b381 100644 --- a/dlls/advpack/reg.c +++ b/dlls/advpack/reg.c @@ -298,6 +298,35 @@ HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupK /*********************************************************************** * RegSaveRestoreOnINFA (advpack.@) * + * See RegSaveRestoreOnINFW. + */ +HRESULT WINAPI RegSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF, + LPCSTR pszSection, HKEY hHKLMBackKey, + HKEY hHKCUBackKey, DWORD dwFlags) +{ + UNICODE_STRING title, inf, section; + HRESULT hr; + + TRACE("(%p, %p, %p, %p, %p, %p, %ld)\n", hWnd, pszTitle, pszINF, + pszSection, hHKLMBackKey, hHKCUBackKey, dwFlags); + + RtlCreateUnicodeStringFromAsciiz(&title, pszTitle); + RtlCreateUnicodeStringFromAsciiz(&inf, pszINF); + RtlCreateUnicodeStringFromAsciiz(§ion, pszSection); + + hr = RegSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer, + hHKLMBackKey, hHKCUBackKey, dwFlags); + + RtlFreeUnicodeString(&title); + RtlFreeUnicodeString(&inf); + RtlFreeUnicodeString(§ion); + + return hr; +} + +/*********************************************************************** + * RegSaveRestoreOnINFW (advpack.@) + * * Saves or restores the specified INF Reg section. * * PARAMS @@ -316,9 +345,9 @@ HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupK * BUGS * Unimplemented. */ -HRESULT WINAPI RegSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF, - LPCSTR pszSection, HKEY hHKLMBackKey, - HKEY hHKCUBackKey, DWORD dwFlags) +HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, + LPCWSTR pszSection, HKEY hHKLMBackKey, + HKEY hHKCUBackKey, DWORD dwFlags) { FIXME("(%p, %p, %p, %p, %p, %p, %ld) stub\n", hWnd, pszTitle, pszINF, pszSection, hHKLMBackKey, hHKCUBackKey, dwFlags);