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
7eb3db63
Commit
7eb3db63
authored
May 11, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
May 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: automation: Implement Installer::CreateRecord.
parent
075e1898
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
16 deletions
+43
-16
automation.c
dlls/msi/automation.c
+24
-0
msiserver.idl
dlls/msi/msiserver.idl
+2
-0
msiserver_dispids.h
dlls/msi/msiserver_dispids.h
+1
-0
automation.c
dlls/msi/tests/automation.c
+16
-16
No files found.
dlls/msi/automation.c
View file @
7eb3db63
...
...
@@ -1115,6 +1115,30 @@ static HRESULT WINAPI InstallerImpl_Invoke(
switch
(
dispIdMember
)
{
case
DISPID_INSTALLER_CREATERECORD
:
if
(
wFlags
&
DISPATCH_METHOD
)
{
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
)))
{
IDispatch_AddRef
(
pDispatch
);
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
;
}
}
break
;
case
DISPID_INSTALLER_OPENPACKAGE
:
if
(
wFlags
&
DISPATCH_METHOD
)
{
...
...
dlls/msi/msiserver.idl
View file @
7eb3db63
...
...
@@ -59,6 +59,8 @@ library WindowsInstaller
{
properties
:
methods
:
[
id
(
DISPID_INSTALLER_CREATERECORD
)
]
Record
*
CreateRecord
(
[
in
]
long
Count
)
;
[
id
(
DISPID_INSTALLER_OPENPACKAGE
)
]
Session
*
OpenPackage
(
[
in
]
VARIANT
PackagePath
,
...
...
dlls/msi/msiserver_dispids.h
View file @
7eb3db63
...
...
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define DISPID_INSTALLER_CREATERECORD 1
#define DISPID_INSTALLER_OPENPACKAGE 2
#define DISPID_INSTALLER_REGISTRYVALUE 11
#define DISPID_INSTALLER_PRODUCTSTATE 17
...
...
dlls/msi/tests/automation.c
View file @
7eb3db63
...
...
@@ -312,9 +312,7 @@ static DISPID get_dispid( IDispatch *disp, const char *name )
static
void
test_dispid
(
void
)
{
todo_wine
{
ok
(
get_dispid
(
pInstaller
,
"CreateRecord"
)
==
1
,
"dispid wrong
\n
"
);
}
ok
(
get_dispid
(
pInstaller
,
"OpenPackage"
)
==
2
,
"dispid wrong
\n
"
);
todo_wine
{
ok
(
get_dispid
(
pInstaller
,
"OpenProduct"
)
==
3
,
"dispid wrong
\n
"
);
...
...
@@ -1350,25 +1348,27 @@ static void test_Installer(void)
if
(
!
pInstaller
)
return
;
/* Installer::CreateRecord */
todo_wine
{
/* Test for error */
hr
=
Installer_CreateRecord
(
-
1
,
&
pRecord
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"Installer_CreateRecord failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szCreateRecordException
);
/* Test for success */
hr
=
Installer_CreateRecord
(
1
,
&
pRecord
);
ok
(
SUCCEEDED
(
hr
),
"Installer_CreateRecord failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
pRecord
!=
NULL
,
"Installer_CreateRecord should not have returned NULL record
\n
"
);
}
/* Test for error */
hr
=
Installer_CreateRecord
(
-
1
,
&
pRecord
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"Installer_CreateRecord failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szCreateRecordException
);
/* Test for success */
hr
=
Installer_CreateRecord
(
1
,
&
pRecord
);
ok
(
SUCCEEDED
(
hr
),
"Installer_CreateRecord failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
pRecord
!=
NULL
,
"Installer_CreateRecord should not have returned NULL record
\n
"
);
if
(
pRecord
)
{
int
iFieldCount
=
0
;
/* Record::FieldCountGet */
hr
=
Record_FieldCountGet
(
pRecord
,
&
iFieldCount
);
ok
(
SUCCEEDED
(
hr
),
"Record_FiledCountGet failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
iFieldCount
==
1
,
"Record_FieldCountGet result was %d but expected 1
\n
"
,
iFieldCount
);
todo_wine
{
hr
=
Record_FieldCountGet
(
pRecord
,
&
iFieldCount
);
ok
(
SUCCEEDED
(
hr
),
"Record_FiledCountGet failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
iFieldCount
==
1
,
"Record_FieldCountGet result was %d but expected 1
\n
"
,
iFieldCount
);
}
IDispatch_Release
(
pRecord
);
}
...
...
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