Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0c503def
Commit
0c503def
authored
Jun 01, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: automation: Fix SummaryInfo::Property get to conform to native.
parent
f2c10a53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
42 deletions
+35
-42
automation.c
dlls/msi/automation.c
+31
-34
automation.c
dlls/msi/tests/automation.c
+4
-8
No files found.
dlls/msi/automation.c
View file @
0c503def
...
...
@@ -764,17 +764,15 @@ static HRESULT WINAPI SummaryInfoImpl_Invoke(
if
(
pid
==
PID_CODEPAGE
||
(
pid
>=
PID_PAGECOUNT
&&
pid
<=
PID_CHARCOUNT
)
||
pid
==
PID_SECURITY
)
{
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
&
value
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
return
DISP_E_EXCEPTION
;
if
(
pid
==
PID_CODEPAGE
)
if
((
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
&
value
,
NULL
,
NULL
,
NULL
))
!=
ERROR_SUCCESS
)
ERR
(
"MsiSummaryInfoGetProperty returned %d
\n
"
,
ret
);
else
if
(
type
==
VT_I2
)
{
V_VT
(
pVarResult
)
=
VT_I2
;
V_I2
(
pVarResult
)
=
value
;
}
else
else
if
(
type
==
VT_I4
)
{
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
value
;
...
...
@@ -785,44 +783,43 @@ static HRESULT WINAPI SummaryInfoImpl_Invoke(
LPWSTR
str
;
DWORD
size
=
0
;
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
NULL
,
NULL
,
szEmpty
,
&
size
);
if
(
ret
!=
ERROR_MORE_DATA
)
return
DISP_E_EXCEPTION
;
str
=
msi_alloc
(
++
size
*
sizeof
(
WCHAR
));
if
(
!
str
)
return
DISP_E_EXCEPTION
;
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
NULL
,
NULL
,
str
,
&
size
);
if
(
ret
!=
ERROR_SUCCESS
)
if
((
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
NULL
,
NULL
,
szEmpty
,
&
size
))
==
ERROR_MORE_DATA
)
{
if
(
!
(
str
=
msi_alloc
(
++
size
*
sizeof
(
WCHAR
))))
ERR
(
"Out of memory
\n
"
);
else
if
((
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
NULL
,
NULL
,
str
,
&
size
))
==
ERROR_SUCCESS
)
{
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
str
);
}
msi_free
(
str
);
return
DISP_E_EXCEPTION
;
}
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
str
);
msi_free
(
str
);
if
(
ret
!=
ERROR_SUCCESS
&&
ret
!=
ERROR_MORE_DATA
)
ERR
(
"MsiSummaryInfoGetProperty returned %d
\n
"
,
ret
);
}
else
if
(
pid
>=
PID_EDITTIME
&&
pid
<=
PID_LASTSAVE_DTM
)
{
FILETIME
ft
;
FILETIME
ft
,
ftlocal
;
SYSTEMTIME
st
;
DATE
date
;
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
&
value
,
&
ft
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
return
DISP_E_EXCEPTION
;
FileTimeToSystemTime
(
&
ft
,
&
st
);
SystemTimeToVariantTime
(
&
st
,
&
date
);
if
((
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
&
value
,
&
ft
,
NULL
,
NULL
))
!=
ERROR_SUCCESS
)
ERR
(
"MsiSummaryInfoGetProperty returned %d
\n
"
,
ret
);
else
if
(
type
==
VT_FILETIME
)
{
FileTimeToLocalFileTime
(
&
ft
,
&
ftlocal
);
FileTimeToSystemTime
(
&
ftlocal
,
&
st
);
SystemTimeToVariantTime
(
&
st
,
&
date
);
V_VT
(
pVarResult
)
=
VT_DATE
;
V_DATE
(
pVarResult
)
=
date
;
V_VT
(
pVarResult
)
=
VT_DATE
;
V_DATE
(
pVarResult
)
=
date
;
}
}
else
if
(
pid
!=
PID_DICTIONARY
&&
pid
!=
PID_THUMBNAIL
)
return
DISP_E_EXCEPTION
;
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
...
...
dlls/msi/tests/automation.c
View file @
0c503def
...
...
@@ -1289,7 +1289,7 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
else
if
(
vt
==
VT_I4
)
ok
(
V_I4
(
&
varresult
)
==
entry
->
iValue
,
"SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %d
\n
"
,
entry
->
property
,
entry
->
iValue
,
V_I4
(
&
varresult
));
else
if
(
vt
==
VT_DATE
)
todo_wine
else
if
(
vt
==
VT_DATE
)
{
SYSTEMTIME
st
;
FILETIME
ft
;
...
...
@@ -1312,11 +1312,11 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
/* Invalid pids */
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
-
1
,
&
varresult
,
VT_EMPTY
);
todo_wine
ok
(
hr
==
DISP_E_EXCEPTION
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szPropertyException
);
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
1000
,
&
varresult
,
VT_EMPTY
);
todo_wine
ok
(
hr
==
DISP_E_EXCEPTION
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szPropertyException
);
/* Unsupported pids */
...
...
@@ -1327,21 +1327,17 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
/* Pids we have not set, one for each type */
_invoke_todo_vtResult
=
1
;
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
PID_CODEPAGE
,
&
varresult
,
VT_EMPTY
);
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
PID_TITLE
,
&
varresult
,
VT_EMPTY
);
todo_wine
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
PID_EDITTIME
,
&
varresult
,
VT_EMPTY
);
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
hr
=
SummaryInfo_PropertyGet
(
pSummaryInfo
,
PID_CHARCOUNT
,
&
varresult
,
VT_EMPTY
);
ok
(
hr
==
S_OK
,
"SummaryInfo_PropertyGet failed, hresult 0x%08x
\n
"
,
hr
);
_invoke_todo_vtResult
=
0
;
}
static
void
test_Database
(
IDispatch
*
pDatabase
)
...
...
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