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
9f09d47b
Commit
9f09d47b
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.ProductInfo method into InstallerImpl_ProductInfo.
parent
fd2884a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
32 deletions
+62
-32
automation.c
dlls/msi/automation.c
+62
-32
No files found.
dlls/msi/automation.c
View file @
9f09d47b
...
...
@@ -2060,7 +2060,6 @@ static HRESULT InstallerImpl_ProductState(WORD wFlags,
HRESULT
hr
;
VARIANTARG
varg0
;
if
(
!
(
wFlags
&
DISPATCH_PROPERTYGET
))
return
DISP_E_MEMBERNOTFOUND
;
...
...
@@ -2076,6 +2075,66 @@ static HRESULT InstallerImpl_ProductState(WORD wFlags,
return
S_OK
;
}
static
HRESULT
InstallerImpl_ProductInfo
(
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
UINT
ret
;
HRESULT
hr
;
DWORD
size
;
LPWSTR
str
;
VARIANTARG
varg0
,
varg1
;
if
(
!
(
wFlags
&
DISPATCH_PROPERTYGET
))
return
DISP_E_MEMBERNOTFOUND
;
VariantInit
(
&
varg0
);
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_BSTR
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
VariantInit
(
&
varg1
);
hr
=
DispGetParam
(
pDispParams
,
1
,
VT_BSTR
,
&
varg1
,
puArgErr
);
if
(
FAILED
(
hr
))
goto
done
;
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
NULL
;
ret
=
MsiGetProductInfoW
(
V_BSTR
(
&
varg0
),
V_BSTR
(
&
varg1
),
NULL
,
&
size
);
if
(
ret
!=
ERROR_SUCCESS
)
{
hr
=
DISP_E_EXCEPTION
;
goto
done
;
}
str
=
msi_alloc
(
++
size
*
sizeof
(
WCHAR
));
if
(
!
str
)
{
hr
=
E_OUTOFMEMORY
;
goto
done
;
}
ret
=
MsiGetProductInfoW
(
V_BSTR
(
&
varg0
),
V_BSTR
(
&
varg1
),
str
,
&
size
);
msi_free
(
str
);
if
(
ret
!=
ERROR_SUCCESS
)
{
hr
=
DISP_E_EXCEPTION
;
goto
done
;
}
V_BSTR
(
pVarResult
)
=
SysAllocString
(
str
);
hr
=
S_OK
;
done
:
VariantClear
(
&
varg0
);
VariantClear
(
&
varg1
);
return
hr
;
}
static
HRESULT
WINAPI
InstallerImpl_Invoke
(
AutomationObject
*
This
,
DISPID
dispIdMember
,
...
...
@@ -2091,8 +2150,6 @@ static HRESULT WINAPI InstallerImpl_Invoke(
UINT
ret
;
VARIANTARG
varg0
,
varg1
,
varg2
;
HRESULT
hr
;
LPWSTR
szString
=
NULL
;
DWORD
dwSize
=
0
;
VariantInit
(
&
varg0
);
VariantInit
(
&
varg1
);
...
...
@@ -2170,35 +2227,8 @@ static HRESULT WINAPI InstallerImpl_Invoke(
pVarResult
,
pExcepInfo
,
puArgErr
);
case
DISPID_INSTALLER_PRODUCTINFO
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_BSTR
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
DispGetParam
(
pDispParams
,
1
,
VT_BSTR
,
&
varg1
,
puArgErr
);
if
(
FAILED
(
hr
))
{
VariantClear
(
&
varg0
);
return
hr
;
}
V_VT
(
pVarResult
)
=
VT_BSTR
;
V_BSTR
(
pVarResult
)
=
NULL
;
if
((
ret
=
MsiGetProductInfoW
(
V_BSTR
(
&
varg0
),
V_BSTR
(
&
varg1
),
NULL
,
&
dwSize
))
==
ERROR_SUCCESS
)
{
if
(
!
(
szString
=
msi_alloc
((
++
dwSize
)
*
sizeof
(
WCHAR
))))
ERR
(
"Out of memory
\n
"
);
else
if
((
ret
=
MsiGetProductInfoW
(
V_BSTR
(
&
varg0
),
V_BSTR
(
&
varg1
),
szString
,
&
dwSize
))
==
ERROR_SUCCESS
)
V_BSTR
(
pVarResult
)
=
SysAllocString
(
szString
);
msi_free
(
szString
);
}
if
(
ret
!=
ERROR_SUCCESS
)
{
ERR
(
"MsiGetProductInfo returned %d
\n
"
,
ret
);
VariantClear
(
&
varg1
);
VariantClear
(
&
varg0
);
return
DISP_E_EXCEPTION
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
return
InstallerImpl_ProductInfo
(
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
case
DISPID_INSTALLER_PRODUCTS
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
...
...
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