Commit c4ca6341 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

advpack: Implement the RegisterOCXs callback.

parent 9be30c83
......@@ -21,6 +21,7 @@
#ifndef __ADVPACK_PRIVATE_H
#define __ADVPACK_PRIVATE_H
HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg);
LPWSTR get_parameter(LPWSTR *params, WCHAR separator);
void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir);
......
......@@ -62,8 +62,35 @@ static const WCHAR RegisterOCXs[] = {'R','e','g','i','s','t','e','r','O','C','X'
/* Advanced INF callbacks */
static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
{
FIXME("Unhandled command: RegisterOCXs\n");
return E_FAIL;
HMODULE hm;
INFCONTEXT context;
HRESULT hr = S_OK;
BOOL ok = SetupFindFirstLineW(hinf, field, NULL, &context);
for (; ok; ok = SetupFindNextLine(&context, &context))
{
WCHAR buffer[MAX_INF_STRING_LENGTH];
/* get OCX filename */
if (!SetupGetStringFieldW(&context, 1, buffer,
sizeof(buffer) / sizeof(WCHAR), NULL))
continue;
hm = LoadLibraryExW(buffer, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (!hm)
{
hr = E_FAIL;
continue;
}
if (do_ocx_reg(hm, TRUE))
hr = E_FAIL;
FreeLibrary(hm);
}
return hr;
}
/* sequentially returns pointers to parameters in a parameter list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment