Commit 2a28f164 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit 14.1.6 upon wine-1.7.25

parent a822ef3f
......@@ -1832,13 +1832,41 @@ static HRESULT InstallerImpl_SummaryInformation(WORD wFlags,
EXCEPINFO* pExcepInfo,
UINT* puArgErr)
{
if (!(wFlags & DISPATCH_METHOD))
UINT ret;
HRESULT hr;
MSIHANDLE hsuminfo;
IDispatch *dispatch;
VARIANTARG varg0, varg1;
if (!(wFlags & DISPATCH_PROPERTYGET))
return DISP_E_MEMBERNOTFOUND;
FIXME("\n");
VariantInit(&varg0);
hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr);
if (FAILED(hr))
return hr;
VariantInit(pVarResult);
return S_OK;
VariantInit(&varg1);
hr = DispGetParam(pDispParams, 1, VT_I4, &varg1, puArgErr);
if (FAILED(hr))
return hr;
V_VT(pVarResult) = VT_DISPATCH;
ret = MsiGetSummaryInformationW(0, V_BSTR(&varg0), V_I4(&varg1), &hsuminfo);
if (ret != ERROR_SUCCESS)
{
hr = DISP_E_EXCEPTION;
goto done;
}
hr = create_summaryinfo(hsuminfo, &dispatch);
if (SUCCEEDED(hr))
V_DISPATCH(pVarResult) = dispatch;
done:
VariantClear(&varg0);
return hr;
}
static HRESULT InstallerImpl_UILevel(WORD wFlags,
......
......@@ -1128,6 +1128,25 @@ static HRESULT Installer_UILevelPut(int level)
return invoke(pInstaller, "UILevel", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY);
}
static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch **pSumInfo)
{
VARIANT varresult;
VARIANTARG vararg[2];
DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0};
HRESULT hr;
VariantInit(&vararg[1]);
V_VT(&vararg[1]) = VT_BSTR;
V_BSTR(&vararg[1]) = SysAllocString(PackagePath);
VariantInit(&vararg[0]);
V_VT(&vararg[0]) = VT_I4;
V_I4(&vararg[0]) = UpdateCount;
hr = invoke(pInstaller, "SummaryInformation", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH);
*pSumInfo = V_DISPATCH(&varresult);
return hr;
}
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
{
VARIANT varresult;
......@@ -2602,7 +2621,7 @@ static void test_Installer(void)
static const WCHAR szIntegerDataException[] = { 'I','n','t','e','g','e','r','D','a','t','a',',','F','i','e','l','d',0 };
WCHAR szPath[MAX_PATH];
HRESULT hr;
IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL;
IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL, *pSumInfo = NULL;
int iValue, iCount;
if (!pInstaller) return;
......@@ -2678,6 +2697,18 @@ static void test_Installer(void)
IDispatch_Release(pDatabase);
}
/* Installer::SummaryInformation */
hr = Installer_SummaryInformation(szPath, 0, &pSumInfo);
ok(hr == S_OK, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
if (hr == S_OK)
{
test_SummaryInfo(pSumInfo, summary_info, sizeof(summary_info)/sizeof(msi_summary_info), TRUE);
IDispatch_Release(pSumInfo);
}
hr = Installer_SummaryInformation(NULL, 0, &pSumInfo);
ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
/* Installer::RegistryValue */
test_Installer_RegistryValue();
......
......@@ -174,4 +174,21 @@ Call ok(x.IgnoreCase = false, "RegExp.IgnoreCase = " & x.IgnoreCase)
Call ok(x.Global = false, "RegExp.Global = " & x.Global)
Call ok(x.Multiline = false, "RegExp.Multiline = " & x.Multiline)
set matches = x.execute("test")
Call ok(matches.Count = 1, "matches.Count = " & matches.Count)
x.pattern = ""
set matches = x.execute("test")
Call ok(matches.Count = 1, "matches.Count = " & matches.Count)
set match = matches.item(0)
Call ok(match.Value = "", "match.Value = " & match.Value)
x.global = true
set matches = x.execute("test")
Call ok(matches.Count = 5, "matches.Count = " & matches.Count)
set match = matches.item(0)
Call ok(match.Value = "", "match.Value = " & match.Value)
set match = matches.item(4)
Call ok(match.Value = "", "match.Value = " & match.Value)
matches = x.test("test")
Call ok(matches = true, "matches = " & matches)
Call reportSuccess()
......@@ -1189,29 +1189,23 @@ static HRESULT WINAPI RegExp2_get_Pattern(IRegExp2 *iface, BSTR *pPattern)
static HRESULT WINAPI RegExp2_put_Pattern(IRegExp2 *iface, BSTR pattern)
{
RegExp2 *This = impl_from_IRegExp2(iface);
WCHAR *p;
DWORD size;
WCHAR *new_pattern;
TRACE("(%p)->(%s)\n", This, wine_dbgstr_w(pattern));
if(!pattern) {
heap_free(This->pattern);
if(This->regexp) {
regexp_destroy(This->regexp);
This->regexp = NULL;
}
This->pattern = NULL;
return S_OK;
if(pattern && *pattern) {
SIZE_T size = (SysStringLen(pattern)+1) * sizeof(WCHAR);
new_pattern = heap_alloc(size);
if(!new_pattern)
return E_OUTOFMEMORY;
memcpy(new_pattern, pattern, size);
}else {
new_pattern = NULL;
}
size = (SysStringLen(pattern)+1) * sizeof(WCHAR);
p = heap_alloc(size);
if(!p)
return E_OUTOFMEMORY;
heap_free(This->pattern);
This->pattern = p;
memcpy(p, pattern, size);
This->pattern = new_pattern;
if(This->regexp) {
regexp_destroy(This->regexp);
This->regexp = NULL;
......
......@@ -1330,9 +1330,8 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
HINTERNET rc = NULL;
DWORD res = ERROR_SUCCESS;
TRACE("(%p, %s, %i, %s, %s, %i, %x, %lx)\n", hInternet, debugstr_w(lpszServerName),
nServerPort, debugstr_w(lpszUserName), debugstr_w(lpszPassword),
dwService, dwFlags, dwContext);
TRACE("(%p, %s, %u, %s, %p, %u, %x, %lx)\n", hInternet, debugstr_w(lpszServerName),
nServerPort, debugstr_w(lpszUserName), lpszPassword, dwService, dwFlags, dwContext);
if (!lpszServerName)
{
......
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