Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aa9f4beb
Commit
aa9f4beb
authored
May 11, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
May 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: automation: Return DISP_E_MEMBERNOTFOUND if flags are incorrect.
parent
6bb7c911
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
automation.c
dlls/msi/automation.c
+24
-0
automation.c
dlls/msi/tests/automation.c
+4
-4
No files found.
dlls/msi/automation.c
View file @
aa9f4beb
...
@@ -597,6 +597,7 @@ static HRESULT WINAPI RecordImpl_Invoke(
...
@@ -597,6 +597,7 @@ static HRESULT WINAPI RecordImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
@@ -637,6 +638,7 @@ static HRESULT WINAPI StringListImpl_Invoke(
...
@@ -637,6 +638,7 @@ static HRESULT WINAPI StringListImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
data
->
pszStrings
[
V_I4
(
&
varg0
)]);
V_BSTR
(
pVarResult
)
=
SysAllocString
(
data
->
pszStrings
[
V_I4
(
&
varg0
)]);
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_STRINGLIST_COUNT
:
case
DISPID_STRINGLIST_COUNT
:
...
@@ -644,6 +646,7 @@ static HRESULT WINAPI StringListImpl_Invoke(
...
@@ -644,6 +646,7 @@ static HRESULT WINAPI StringListImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_I4
;
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
data
->
iCount
;
V_I4
(
pVarResult
)
=
data
->
iCount
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
@@ -696,6 +699,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
...
@@ -696,6 +699,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
else
else
MsiViewExecute
(
This
->
msiHandle
,
0
);
MsiViewExecute
(
This
->
msiHandle
,
0
);
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_VIEW_FETCH
:
case
DISPID_VIEW_FETCH
:
...
@@ -720,6 +724,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
...
@@ -720,6 +724,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_VIEW_CLOSE
:
case
DISPID_VIEW_CLOSE
:
...
@@ -727,6 +732,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
...
@@ -727,6 +732,7 @@ static HRESULT WINAPI ViewImpl_Invoke(
{
{
MsiViewClose
(
This
->
msiHandle
);
MsiViewClose
(
This
->
msiHandle
);
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
@@ -784,6 +790,7 @@ static HRESULT WINAPI DatabaseImpl_Invoke(
...
@@ -784,6 +790,7 @@ static HRESULT WINAPI DatabaseImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
@@ -829,6 +836,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -829,6 +836,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
IDispatch_AddRef
(
data
->
pInstaller
);
IDispatch_AddRef
(
data
->
pInstaller
);
V_DISPATCH
(
pVarResult
)
=
data
->
pInstaller
;
V_DISPATCH
(
pVarResult
)
=
data
->
pInstaller
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_PROPERTY
:
case
DISPID_SESSION_PROPERTY
:
...
@@ -866,6 +874,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -866,6 +874,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_LANGUAGE
:
case
DISPID_SESSION_LANGUAGE
:
...
@@ -874,6 +883,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -874,6 +883,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_I4
;
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
langId
;
V_I4
(
pVarResult
)
=
langId
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_MODE
:
case
DISPID_SESSION_MODE
:
...
@@ -893,6 +903,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -893,6 +903,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_DATABASE
:
case
DISPID_SESSION_DATABASE
:
...
@@ -914,6 +925,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -914,6 +925,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_DOACTION
:
case
DISPID_SESSION_DOACTION
:
...
@@ -954,6 +966,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -954,6 +966,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_EVALUATECONDITION
:
case
DISPID_SESSION_EVALUATECONDITION
:
...
@@ -963,9 +976,11 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -963,9 +976,11 @@ static HRESULT WINAPI SessionImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_I4
;
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
MsiEvaluateConditionW
(
This
->
msiHandle
,
V_BSTR
(
&
varg0
));
V_I4
(
pVarResult
)
=
MsiEvaluateConditionW
(
This
->
msiHandle
,
V_BSTR
(
&
varg0
));
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_SETINSTALLLEVEL
:
case
DISPID_SESSION_SETINSTALLLEVEL
:
if
(
wFlags
&
DISPATCH_METHOD
)
{
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
if
((
ret
=
MsiSetInstallLevel
(
This
->
msiHandle
,
V_I4
(
&
varg0
)))
!=
ERROR_SUCCESS
)
if
((
ret
=
MsiSetInstallLevel
(
This
->
msiHandle
,
V_I4
(
&
varg0
)))
!=
ERROR_SUCCESS
)
...
@@ -973,6 +988,8 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -973,6 +988,8 @@ static HRESULT WINAPI SessionImpl_Invoke(
ERR
(
"MsiSetInstallLevel returned %d
\n
"
,
ret
);
ERR
(
"MsiSetInstallLevel returned %d
\n
"
,
ret
);
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_FEATURECURRENTSTATE
:
case
DISPID_SESSION_FEATURECURRENTSTATE
:
...
@@ -988,6 +1005,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -988,6 +1005,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
V_I4
(
pVarResult
)
=
msiInstallStateUnknown
;
V_I4
(
pVarResult
)
=
msiInstallStateUnknown
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_SESSION_FEATUREREQUESTSTATE
:
case
DISPID_SESSION_FEATUREREQUESTSTATE
:
...
@@ -1017,6 +1035,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
...
@@ -1017,6 +1035,7 @@ static HRESULT WINAPI SessionImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
@@ -1137,6 +1156,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1137,6 +1156,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_INSTALLER_OPENPACKAGE
:
case
DISPID_INSTALLER_OPENPACKAGE
:
...
@@ -1168,6 +1188,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1168,6 +1188,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
return
DISP_E_EXCEPTION
;
return
DISP_E_EXCEPTION
;
}
}
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_INSTALLER_REGISTRYVALUE
:
case
DISPID_INSTALLER_REGISTRYVALUE
:
...
@@ -1257,6 +1278,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1257,6 +1278,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
msi_free
(
szString
);
msi_free
(
szString
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_INSTALLER_PRODUCTSTATE
:
case
DISPID_INSTALLER_PRODUCTSTATE
:
...
@@ -1266,6 +1288,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1266,6 +1288,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_I4
;
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
MsiQueryProductStateW
(
V_BSTR
(
&
varg0
));
V_I4
(
pVarResult
)
=
MsiQueryProductStateW
(
V_BSTR
(
&
varg0
));
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
case
DISPID_INSTALLER_PRODUCTS
:
case
DISPID_INSTALLER_PRODUCTS
:
...
@@ -1306,6 +1329,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1306,6 +1329,7 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else
else
ERR
(
"Failed to create StringList object, hresult 0x%08x
\n
"
,
hr
);
ERR
(
"Failed to create StringList object, hresult 0x%08x
\n
"
,
hr
);
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
break
;
default
:
default
:
...
...
dlls/msi/tests/automation.c
View file @
aa9f4beb
...
@@ -449,11 +449,11 @@ static void test_dispatch(void)
...
@@ -449,11 +449,11 @@ static void test_dispatch(void)
/* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */
/* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */
VariantInit
(
&
vararg
[
0
]);
VariantInit
(
&
vararg
[
0
]);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
VariantInit
(
&
vararg
[
0
]);
VariantInit
(
&
vararg
[
0
]);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
/* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */
/* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */
name
=
(
WCHAR
*
)
szProductState
;
name
=
(
WCHAR
*
)
szProductState
;
...
@@ -463,12 +463,12 @@ static void test_dispatch(void)
...
@@ -463,12 +463,12 @@ static void test_dispatch(void)
dispparams
.
rgvarg
=
NULL
;
dispparams
.
rgvarg
=
NULL
;
dispparams
.
cArgs
=
0
;
dispparams
.
cArgs
=
0
;
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
dispparams
.
rgvarg
=
NULL
;
dispparams
.
rgvarg
=
NULL
;
dispparams
.
cArgs
=
0
;
dispparams
.
cArgs
=
0
;
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
hr
=
IDispatch_Invoke
(
pInstaller
,
dispid
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IDispatch::Invoke returned 0x%08x
\n
"
,
hr
);
}
}
/* invocation helper function */
/* invocation helper function */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment