"Vincent Povirk" <vincent(a)codeweavers.com> writes:
> +HRESULT register_classes(void)
> +{
> + int i;
> + HKEY clsid_key, ips32_key;
> + LONG res=0;
> + HRESULT hr=S_OK;
> + static const WCHAR inprocserver32W[] = {'I','n','P','r','o','c','S','e','r','v','e','r','3','2',0};
> +
> + for (i=0; wic_classes[i].classid; i++)
> + {
> + hr = get_clsid_key(wic_classes[i].classid, KEY_READ|KEY_WRITE, &clsid_key);
> + if (!SUCCEEDED(hr)) break;
> +
> + res = RegCreateKeyExW(clsid_key, inprocserver32W, 0, NULL, 0,
> + KEY_READ|KEY_WRITE, NULL, &ips32_key, NULL);
> + if (res == ERROR_SUCCESS)
> + {
> + res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, (CONST BYTE*)"windowscodecs.dll", lstrlenA("windowscodecs.dll") + 1);
> + if (res != ERROR_SUCCESS)
> + break;
> + res = RegSetValueExA(ips32_key, "ThreadingModel", 0, REG_SZ, (CONST BYTE*)"Apartment", lstrlenA("Apartment") + 1);
> + if (res != ERROR_SUCCESS)
> + break;
> + }
> + else
> + break;
> +
> + RegCloseKey(clsid_key);
> + }
> +
> + if (res != 0) hr = HRESULT_FROM_WIN32(res);
> +
> + return hr;
> +}
Please copy the standard regsvr.c registration code instead.
--
Alexandre Julliard
julliard(a)winehq.org