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
b73389b6
Commit
b73389b6
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.CreateRecord method into InstallerImpl_CreateRecord.
parent
ae58e29e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
20 deletions
+35
-20
automation.c
dlls/msi/automation.c
+35
-20
No files found.
dlls/msi/automation.c
View file @
b73389b6
...
@@ -1534,6 +1534,39 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
...
@@ -1534,6 +1534,39 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
}
}
}
}
static
HRESULT
InstallerImpl_CreateRecord
(
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HRESULT
hr
;
VARIANTARG
varg0
;
MSIHANDLE
hrec
;
IDispatch
*
dispatch
;
if
(
!
(
wFlags
&
DISPATCH_METHOD
))
return
DISP_E_MEMBERNOTFOUND
;
VariantInit
(
&
varg0
);
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
V_VT
(
pVarResult
)
=
VT_DISPATCH
;
hrec
=
MsiCreateRecord
(
V_I4
(
&
varg0
));
if
(
!
hrec
)
return
DISP_E_EXCEPTION
;
hr
=
create_automation_object
(
hrec
,
NULL
,
(
LPVOID
*
)
&
dispatch
,
&
DIID_Record
,
RecordImpl_Invoke
,
NULL
,
0
);
if
(
SUCCEEDED
(
hr
))
V_DISPATCH
(
pVarResult
)
=
dispatch
;
return
hr
;
}
static
HRESULT
WINAPI
InstallerImpl_Invoke
(
static
HRESULT
WINAPI
InstallerImpl_Invoke
(
AutomationObject
*
This
,
AutomationObject
*
This
,
DISPID
dispIdMember
,
DISPID
dispIdMember
,
...
@@ -1561,26 +1594,8 @@ static HRESULT WINAPI InstallerImpl_Invoke(
...
@@ -1561,26 +1594,8 @@ static HRESULT WINAPI InstallerImpl_Invoke(
switch
(
dispIdMember
)
switch
(
dispIdMember
)
{
{
case
DISPID_INSTALLER_CREATERECORD
:
case
DISPID_INSTALLER_CREATERECORD
:
if
(
wFlags
&
DISPATCH_METHOD
)
return
InstallerImpl_CreateRecord
(
wFlags
,
pDispParams
,
{
pVarResult
,
pExcepInfo
,
puArgErr
);
hr
=
DispGetParam
(
pDispParams
,
0
,
VT_I4
,
&
varg0
,
puArgErr
);
if
(
FAILED
(
hr
))
return
hr
;
V_VT
(
pVarResult
)
=
VT_DISPATCH
;
if
((
msiHandle
=
MsiCreateRecord
(
V_I4
(
&
varg0
))))
{
if
(
SUCCEEDED
(
hr
=
create_automation_object
(
msiHandle
,
NULL
,
(
LPVOID
*
)
&
pDispatch
,
&
DIID_Record
,
RecordImpl_Invoke
,
NULL
,
0
)))
V_DISPATCH
(
pVarResult
)
=
pDispatch
;
else
ERR
(
"Failed to create Record object, hresult 0x%08x
\n
"
,
hr
);
}
else
{
ERR
(
"MsiCreateRecord failed
\n
"
);
return
DISP_E_EXCEPTION
;
}
}
else
return
DISP_E_MEMBERNOTFOUND
;
break
;
case
DISPID_INSTALLER_OPENPACKAGE
:
case
DISPID_INSTALLER_OPENPACKAGE
:
if
(
wFlags
&
DISPATCH_METHOD
)
if
(
wFlags
&
DISPATCH_METHOD
)
...
...
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