diff --git a/dlls/advpack/advpack.c b/dlls/advpack/advpack.c index 18f33e4616..da86f7561c 100644 --- a/dlls/advpack/advpack.c +++ b/dlls/advpack/advpack.c @@ -428,6 +428,38 @@ void WINAPI RegisterOCX( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show ) /*********************************************************************** * SetPerUserSecValuesA (ADVPACK.@) * + * See SetPerUserSecValuesW. + */ +HRESULT WINAPI SetPerUserSecValuesA(PERUSERSECTIONA* pPerUser) +{ + PERUSERSECTIONW perUserW; + + TRACE("(%p)\n", pPerUser); + + if (!pPerUser) + return E_INVALIDARG; + + MultiByteToWideChar(CP_ACP, 0, pPerUser->szGUID, -1, perUserW.szGUID, + sizeof(perUserW.szGUID) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pPerUser->szDispName, -1, perUserW.szDispName, + sizeof(perUserW.szDispName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pPerUser->szLocale, -1, perUserW.szLocale, + sizeof(perUserW.szLocale) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pPerUser->szStub, -1, perUserW.szStub, + sizeof(perUserW.szStub) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pPerUser->szVersion, -1, perUserW.szVersion, + sizeof(perUserW.szVersion) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pPerUser->szCompID, -1, perUserW.szCompID, + sizeof(perUserW.szCompID) / sizeof(WCHAR)); + perUserW.dwIsInstalled = pPerUser->dwIsInstalled; + perUserW.bRollback = pPerUser->bRollback; + + return SetPerUserSecValuesW(&perUserW); +} + +/*********************************************************************** + * SetPerUserSecValuesW (ADVPACK.@) + * * Prepares the per-user stub values under IsInstalled\{GUID} that * control the per-user installation. * @@ -441,7 +473,7 @@ void WINAPI RegisterOCX( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show ) * BUGS * Unimplemented. */ -HRESULT WINAPI SetPerUserSecValuesA(PERUSERSECTIONA* pPerUser) +HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW* pPerUser) { FIXME("(%p) stub\n", pPerUser); diff --git a/dlls/advpack/advpack.spec b/dlls/advpack/advpack.spec index 3ebe3576fd..6d4b1d1043 100644 --- a/dlls/advpack/advpack.spec +++ b/dlls/advpack/advpack.spec @@ -66,7 +66,7 @@ # stdcall RunSetupCommandW(long wstr wstr wstr wstr wptr long ptr) @ stdcall RunSetupCommand(long str str str str ptr long ptr) RunSetupCommandA @ stdcall SetPerUserSecValuesA(ptr) -# stdcall SetPerUserSecValuesW(ptr) +@ stdcall SetPerUserSecValuesW(ptr) @ stdcall SetPerUserSecValues(ptr) SetPerUserSecValuesA @ stdcall TranslateInfStringA(str str str str ptr long ptr ptr) @ stdcall TranslateInfStringW(wstr wstr wstr wstr ptr long ptr ptr)