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
07058e00
Commit
07058e00
authored
Jan 14, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a helper to create database object.
parent
ff3ed0e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
automation.c
dlls/msi/automation.c
+27
-5
No files found.
dlls/msi/automation.c
View file @
07058e00
...
...
@@ -1239,6 +1239,28 @@ static HRESULT DatabaseImpl_Invoke(
return
S_OK
;
}
static
HRESULT
create_database
(
MSIHANDLE
msiHandle
,
IDispatch
**
dispatch
)
{
AutomationObject
*
database
;
HRESULT
hr
;
TRACE
(
"(%d %p)
\n
"
,
msiHandle
,
dispatch
);
database
=
msi_alloc
(
sizeof
(
AutomationObject
));
if
(
!
database
)
return
E_OUTOFMEMORY
;
hr
=
init_automation_object
(
database
,
msiHandle
,
&
DIID_Database
,
DatabaseImpl_Invoke
,
NULL
);
if
(
hr
!=
S_OK
)
{
msi_free
(
database
);
return
hr
;
}
*
dispatch
=
&
database
->
IDispatch_iface
;
return
hr
;
}
static
HRESULT
SessionImpl_Invoke
(
AutomationObject
*
This
,
DISPID
dispIdMember
,
...
...
@@ -1253,7 +1275,6 @@ static HRESULT SessionImpl_Invoke(
SessionObject
*
session
=
(
SessionObject
*
)
This
;
WCHAR
*
szString
;
DWORD
dwLen
;
IDispatch
*
pDispatch
=
NULL
;
MSIHANDLE
msiHandle
;
LANGID
langId
;
UINT
ret
;
...
...
@@ -1344,8 +1365,10 @@ static HRESULT SessionImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_DISPATCH
;
if
((
msiHandle
=
MsiGetActiveDatabase
(
This
->
msiHandle
)))
{
if
(
SUCCEEDED
(
hr
=
create_automation_object
(
msiHandle
,
NULL
,
(
LPVOID
*
)
&
pDispatch
,
&
DIID_Database
,
DatabaseImpl_Invoke
,
NULL
,
0
)))
V_DISPATCH
(
pVarResult
)
=
pDispatch
;
IDispatch
*
dispatch
;
if
(
SUCCEEDED
(
hr
=
create_database
(
msiHandle
,
&
dispatch
)))
V_DISPATCH
(
pVarResult
)
=
dispatch
;
else
ERR
(
"Failed to create Database object, hresult 0x%08x
\n
"
,
hr
);
}
...
...
@@ -1707,8 +1730,7 @@ static HRESULT InstallerImpl_OpenDatabase(WORD wFlags,
goto
done
;
}
hr
=
create_automation_object
(
hdb
,
NULL
,
(
LPVOID
*
)
&
dispatch
,
&
DIID_Database
,
DatabaseImpl_Invoke
,
NULL
,
0
);
hr
=
create_database
(
hdb
,
&
dispatch
);
if
(
SUCCEEDED
(
hr
))
V_DISPATCH
(
pVarResult
)
=
dispatch
;
...
...
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