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
f083b3c0
Commit
f083b3c0
authored
May 31, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jun 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement SummaryInfo::Property get.
parent
7a289624
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
1 deletion
+144
-1
automation.c
dlls/msi/automation.c
+136
-0
msiserver.idl
dlls/msi/msiserver.idl
+4
-0
msiserver_dispids.h
dlls/msi/msiserver_dispids.h
+3
-0
msidefs.h
include/msidefs.h
+1
-1
No files found.
dlls/msi/automation.c
View file @
f083b3c0
...
@@ -730,6 +730,114 @@ HRESULT WINAPI DispGetParam_CopyOnly(
...
@@ -730,6 +730,114 @@ HRESULT WINAPI DispGetParam_CopyOnly(
&
pdispparams
->
rgvarg
[
pos
]);
&
pdispparams
->
rgvarg
[
pos
]);
}
}
static
HRESULT
WINAPI
SummaryInfoImpl_Invoke
(
AutomationObject
*
This
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
UINT
ret
;
VARIANTARG
varg0
;
HRESULT
hr
;
VariantInit
(
&
varg0
);
switch
(
dispIdMember
)
{
case
DISPID_SUMMARYINFO_PROPERTY
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
UINT
type
;
INT
value
;
INT
pid
;
static
WCHAR
szEmpty
[]
=
{
0
};
VariantClear
(
pVarResult
);
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
pid
=
V_I4
(
&
varg0
);
if
(
pid
==
PID_CODEPAGE
||
(
pid
>=
PID_PAGECOUNT
&&
pid
<=
PID_CHARCOUNT
)
||
PID_SECURITY
)
{
ret
=
MsiSummaryInfoGetPropertyW
(
This
->
msiHandle
,
pid
,
&
type
,
&
value
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
return
DISP_E_EXCEPTION
;
if
(
pid
==
PID_CODEPAGE
)
{
V_VT
(
pVarResult
)
=
VT_I2
;
V_I2
(
pVarResult
)
=
value
;
}
else
{
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
value
;
}
}
else
if
((
pid
>=
PID_TITLE
&&
pid
<=
PID_REVNUMBER
)
||
pid
==
PID_APPNAME
)
{
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
)
{
msi_free
(
str
);
return
DISP_E_EXCEPTION
;
}
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
str
);
msi_free
(
str
);
}
else
if
(
pid
>=
PID_EDITTIME
&&
pid
<=
PID_LASTSAVE_DTM
)
{
FILETIME
ft
;
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
);
V_VT
(
pVarResult
)
=
VT_DATE
;
V_DATE
(
pVarResult
)
=
date
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
default
:
ERR
(
"Member not found: %d
\n
"
,
dispIdMember
);
return
DISP_E_MEMBERNOTFOUND
;
}
VariantClear
(
&
varg0
);
return
S_OK
;
}
static
HRESULT
WINAPI
RecordImpl_Invoke
(
static
HRESULT
WINAPI
RecordImpl_Invoke
(
AutomationObject
*
This
,
AutomationObject
*
This
,
DISPID
dispIdMember
,
DISPID
dispIdMember
,
...
@@ -1010,6 +1118,34 @@ static HRESULT WINAPI DatabaseImpl_Invoke(
...
@@ -1010,6 +1118,34 @@ static HRESULT WINAPI DatabaseImpl_Invoke(
switch
(
dispIdMember
)
switch
(
dispIdMember
)
{
{
case
DISPID_DATABASE_SUMMARYINFORMATION
:
if
(
wFlags
&
DISPATCH_METHOD
)
{
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
V_I4
(
&
varg0
)
=
0
;
V_VT
(
pVarResult
)
=
VT_DISPATCH
;
if
((
ret
=
MsiGetSummaryInformationW
(
This
->
msiHandle
,
NULL
,
V_I4
(
&
varg0
),
&
msiHandle
))
==
ERROR_SUCCESS
)
{
hr
=
create_automation_object
(
msiHandle
,
NULL
,
(
LPVOID
*
)
&
pDispatch
,
&
DIID_SummaryInfo
,
SummaryInfoImpl_Invoke
,
NULL
,
0
);
if
(
SUCCEEDED
(
hr
))
{
IDispatch_AddRef
(
pDispatch
);
V_DISPATCH
(
pVarResult
)
=
pDispatch
;
}
else
ERR
(
"Failed to create SummaryInfo object: 0x%08x
\n
"
,
hr
);
}
else
{
ERR
(
"MsiGetSummaryInformation returned %d
\n
"
,
ret
);
return
DISP_E_EXCEPTION
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
case
DISPID_DATABASE_OPENVIEW
:
case
DISPID_DATABASE_OPENVIEW
:
if
(
wFlags
&
DISPATCH_METHOD
)
if
(
wFlags
&
DISPATCH_METHOD
)
{
{
...
...
dlls/msi/msiserver.idl
View file @
f083b3c0
...
@@ -146,6 +146,8 @@ library WindowsInstaller
...
@@ -146,6 +146,8 @@ library WindowsInstaller
{
{
properties:
properties:
methods:
methods:
[id(DISPID_SUMMARYINFO_PROPERTY), propget]
VARIANT Property([in] long Pid);
}
}
typedef enum {
typedef enum {
...
@@ -188,6 +190,8 @@ library WindowsInstaller
...
@@ -188,6 +190,8 @@ library WindowsInstaller
methods:
methods:
[id(DISPID_DATABASE_OPENVIEW)]
[id(DISPID_DATABASE_OPENVIEW)]
View* OpenView([in] BSTR Sql);
View* OpenView([in] BSTR Sql);
[id(DISPID_DATABASE_SUMMARYINFORMATION)]
SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
}
}
typedef enum {
typedef enum {
...
...
dlls/msi/msiserver_dispids.h
View file @
f083b3c0
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#define DISPID_VIEW_MODIFY 3
#define DISPID_VIEW_MODIFY 3
#define DISPID_VIEW_CLOSE 4
#define DISPID_VIEW_CLOSE 4
#define DISPID_DATABASE_SUMMARYINFORMATION 2
#define DISPID_DATABASE_OPENVIEW 3
#define DISPID_DATABASE_OPENVIEW 3
#define DISPID_SESSION_INSTALLER 1
#define DISPID_SESSION_INSTALLER 1
...
@@ -51,3 +52,5 @@
...
@@ -51,3 +52,5 @@
#define DISPID_SESSION_FEATURECURRENTSTATE 13
#define DISPID_SESSION_FEATURECURRENTSTATE 13
#define DISPID_SESSION_FEATUREREQUESTSTATE 14
#define DISPID_SESSION_FEATUREREQUESTSTATE 14
#define DISPID_SESSION_SETINSTALLLEVEL 19
#define DISPID_SESSION_SETINSTALLLEVEL 19
#define DISPID_SUMMARYINFO_PROPERTY 1
include/msidefs.h
View file @
f083b3c0
...
@@ -229,7 +229,7 @@ enum msidbServiceControlEvent
...
@@ -229,7 +229,7 @@ enum msidbServiceControlEvent
#define PID_TEMPLATE 7
#define PID_TEMPLATE 7
#define PID_LASTAUTHOR 8
#define PID_LASTAUTHOR 8
#define PID_REVNUMBER 9
#define PID_REVNUMBER 9
#define PID_EDITTI
N
E 10
#define PID_EDITTI
M
E 10
#define PID_LASTPRINTED 11
#define PID_LASTPRINTED 11
#define PID_CREATE_DTM 12
#define PID_CREATE_DTM 12
#define PID_LASTSAVE_DTM 13
#define PID_LASTSAVE_DTM 13
...
...
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