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
138d5f1f
Commit
138d5f1f
authored
Dec 10, 2009
by
James Hawkins
Committed by
Alexandre Julliard
Dec 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Refactor the Installer.Version method into InstallerImpl_Version.
parent
96c480b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
automation.c
dlls/msi/automation.c
+30
-18
No files found.
dlls/msi/automation.c
View file @
138d5f1f
...
...
@@ -1799,6 +1799,34 @@ done:
return
hr
;
}
static
HRESULT
InstallerImpl_Version
(
WORD
wFlags
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HRESULT
hr
;
DLLVERSIONINFO
verinfo
;
WCHAR
version
[
MAX_PATH
];
static
const
WCHAR
format
[]
=
{
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
0
};
if
(
!
(
wFlags
&
DISPATCH_PROPERTYGET
))
return
DISP_E_MEMBERNOTFOUND
;
verinfo
.
cbSize
=
sizeof
(
DLLVERSIONINFO
);
hr
=
DllGetVersion
(
&
verinfo
);
if
(
FAILED
(
hr
))
return
hr
;
sprintfW
(
version
,
format
,
verinfo
.
dwMajorVersion
,
verinfo
.
dwMinorVersion
,
verinfo
.
dwBuildNumber
,
verinfo
.
dwPlatformID
);
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
version
);
return
S_OK
;
}
static
HRESULT
InstallerImpl_LastErrorRecord
(
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
...
...
@@ -1933,24 +1961,8 @@ static HRESULT WINAPI InstallerImpl_Invoke(
puArgErr
);
case
DISPID_INSTALLER_VERSION
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
DLLVERSIONINFO
verinfo
;
WCHAR
version
[
MAX_PATH
];
static
const
WCHAR
format
[]
=
{
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
0
};
verinfo
.
cbSize
=
sizeof
(
DLLVERSIONINFO
);
hr
=
DllGetVersion
(
&
verinfo
);
if
(
FAILED
(
hr
))
return
hr
;
sprintfW
(
version
,
format
,
verinfo
.
dwMajorVersion
,
verinfo
.
dwMinorVersion
,
verinfo
.
dwBuildNumber
,
verinfo
.
dwPlatformID
);
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
SysAllocString
(
version
);
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
return
InstallerImpl_Version
(
wFlags
,
pVarResult
,
pExcepInfo
,
puArgErr
);
case
DISPID_INSTALLER_LASTERRORRECORD
:
return
InstallerImpl_LastErrorRecord
(
wFlags
,
pDispParams
,
...
...
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