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
808343fb
Commit
808343fb
authored
Nov 02, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement MsiSetExternalUIRecord.
parent
90fa4fe1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
14 deletions
+65
-14
media.c
dlls/msi/media.c
+8
-1
msi.c
dlls/msi/msi.c
+13
-6
msi_main.c
dlls/msi/msi_main.c
+7
-6
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+8
-1
install.c
dlls/msi/tests/install.c
+28
-0
No files found.
dlls/msi/media.c
View file @
808343fb
...
...
@@ -77,7 +77,7 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
static
const
WCHAR
error_prop
[]
=
{
'E'
,
'r'
,
'r'
,
'o'
,
'r'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
0
};
if
((
msi_get_property_int
(
package
,
szUILevel
,
0
)
&
INSTALLUILEVEL_MASK
)
==
INSTALLUILEVEL_NONE
&&
!
gUIHandlerA
&&
!
gUIHandlerW
)
INSTALLUILEVEL_NONE
&&
!
gUIHandlerA
&&
!
gUIHandlerW
&&
!
gUIHandlerRecord
)
return
ERROR_SUCCESS
;
error
=
generate_error_string
(
package
,
1302
,
1
,
mi
->
disk_prompt
);
...
...
@@ -98,6 +98,13 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
gUIHandlerA
(
gUIContext
,
MB_RETRYCANCEL
|
INSTALLMESSAGE_ERROR
,
msg
);
msi_free
(
msg
);
}
else
if
(
gUIHandlerRecord
)
{
MSIHANDLE
rec
=
MsiCreateRecord
(
1
);
MsiRecordSetStringW
(
rec
,
0
,
error
);
gUIHandlerRecord
(
gUIContext
,
MB_RETRYCANCEL
|
INSTALLMESSAGE_ERROR
,
rec
);
MsiCloseHandle
(
rec
);
}
}
msi_free
(
error
);
...
...
dlls/msi/msi.c
View file @
808343fb
...
...
@@ -3595,13 +3595,20 @@ UINT WINAPI MsiIsProductElevatedA( LPCSTR szProduct, BOOL *pfElevated )
/***********************************************************************
* MsiSetExternalUIRecord [MSI.@]
*/
UINT
WINAPI
MsiSetExternalUIRecord
(
INSTALLUI_HANDLER_RECORD
puiH
andler
,
DWORD
dwMessageFilter
,
LPVOID
pvC
ontext
,
PINSTALLUI_HANDLER_RECORD
p
puiPrevHandler
)
UINT
WINAPI
MsiSetExternalUIRecord
(
INSTALLUI_HANDLER_RECORD
h
andler
,
DWORD
filter
,
LPVOID
c
ontext
,
PINSTALLUI_HANDLER_RECORD
p
rev
)
{
FIXME
(
"%p %08x %p %p
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
,
ppuiPrevHandler
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
TRACE
(
"%p %08x %p %p
\n
"
,
handler
,
filter
,
context
,
prev
);
if
(
prev
)
*
prev
=
gUIHandlerRecord
;
gUIHandlerRecord
=
handler
;
gUIFilter
=
filter
;
gUIContext
=
context
;
return
ERROR_SUCCESS
;
}
/***********************************************************************
...
...
dlls/msi/msi_main.c
View file @
808343fb
...
...
@@ -37,12 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static
LONG
dll_count
;
/* the UI level */
INSTALLUILEVEL
gUILevel
=
INSTALLUILEVEL_BASIC
;
HWND
gUIhwnd
=
0
;
INSTALLUI_HANDLERA
gUIHandlerA
=
NULL
;
INSTALLUI_HANDLERW
gUIHandlerW
=
NULL
;
DWORD
gUIFilter
=
0
;
LPVOID
gUIContext
=
NULL
;
INSTALLUILEVEL
gUILevel
=
INSTALLUILEVEL_BASIC
;
HWND
gUIhwnd
=
0
;
INSTALLUI_HANDLERA
gUIHandlerA
=
NULL
;
INSTALLUI_HANDLERW
gUIHandlerW
=
NULL
;
INSTALLUI_HANDLER_RECORD
gUIHandlerRecord
=
NULL
;
DWORD
gUIFilter
=
0
;
LPVOID
gUIContext
=
NULL
;
WCHAR
gszLogFile
[
MAX_PATH
];
HINSTANCE
msi_hInstance
;
...
...
dlls/msi/msipriv.h
View file @
808343fb
...
...
@@ -843,6 +843,7 @@ extern INSTALLUILEVEL gUILevel;
extern
HWND
gUIhwnd
;
extern
INSTALLUI_HANDLERA
gUIHandlerA
;
extern
INSTALLUI_HANDLERW
gUIHandlerW
;
extern
INSTALLUI_HANDLER_RECORD
gUIHandlerRecord
;
extern
DWORD
gUIFilter
;
extern
LPVOID
gUIContext
;
extern
WCHAR
gszLogFile
[
MAX_PATH
];
...
...
dlls/msi/package.c
View file @
808343fb
...
...
@@ -1203,7 +1203,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
}
}
TRACE
(
"%p %p %
x %x %s
\n
"
,
gUIHandlerA
,
gUIHandlerW
,
TRACE
(
"%p %p %
p %x %x %s
\n
"
,
gUIHandlerA
,
gUIHandlerW
,
gUIHandlerRecord
,
gUIFilter
,
log_type
,
debugstr_w
(
message
));
/* convert it to ASCII */
...
...
@@ -1219,6 +1219,13 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
{
rc
=
gUIHandlerA
(
gUIContext
,
eMessageType
,
msg
);
}
else
if
(
gUIHandlerRecord
&&
(
gUIFilter
&
log_type
))
{
MSIHANDLE
rec
=
MsiCreateRecord
(
1
);
MsiRecordSetStringW
(
rec
,
0
,
message
);
rc
=
gUIHandlerRecord
(
gUIContext
,
eMessageType
,
rec
);
MsiCloseHandle
(
rec
);
}
if
((
!
rc
)
&&
(
gszLogFile
[
0
])
&&
!
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_PROGRESS
))
...
...
dlls/msi/tests/install.c
View file @
808343fb
...
...
@@ -6873,11 +6873,14 @@ static void test_file_in_use_cab(void)
INT
CALLBACK
handler_a
(
LPVOID
context
,
UINT
type
,
LPCSTR
msg
)
{
return
IDOK
;
};
INT
CALLBACK
handler_w
(
LPVOID
context
,
UINT
type
,
LPCWSTR
msg
)
{
return
IDOK
;
};
INT
CALLBACK
handler_record
(
LPVOID
context
,
UINT
type
,
MSIHANDLE
record
)
{
return
IDOK
;
};
static
void
test_MsiSetExternalUI
(
void
)
{
INSTALLUI_HANDLERA
ret_a
;
INSTALLUI_HANDLERW
ret_w
;
INSTALLUI_HANDLER_RECORD
prev
;
UINT
error
;
ret_a
=
MsiSetExternalUIA
(
handler_a
,
INSTALLLOGMODE_ERROR
,
NULL
);
ok
(
ret_a
==
NULL
,
"expected NULL, got %p
\n
"
,
ret_a
);
...
...
@@ -6885,6 +6888,15 @@ static void test_MsiSetExternalUI(void)
ret_a
=
MsiSetExternalUIA
(
NULL
,
0
,
NULL
);
ok
(
ret_a
==
handler_a
,
"expected %p, got %p
\n
"
,
handler_a
,
ret_a
);
error
=
MsiSetExternalUIRecord
(
handler_record
,
INSTALLLOGMODE_ERROR
,
NULL
,
&
prev
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
ok
(
prev
==
NULL
,
"expected NULL, got %p
\n
"
,
prev
);
prev
=
(
INSTALLUI_HANDLER_RECORD
)
0xdeadbeef
;
error
=
MsiSetExternalUIRecord
(
NULL
,
INSTALLLOGMODE_ERROR
,
NULL
,
&
prev
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
ok
(
prev
==
handler_record
,
"expected %p, got %p
\n
"
,
handler_record
,
prev
);
ret_w
=
MsiSetExternalUIW
(
handler_w
,
INSTALLLOGMODE_ERROR
,
NULL
);
ok
(
ret_w
==
NULL
,
"expected NULL, got %p
\n
"
,
ret_w
);
...
...
@@ -6897,11 +6909,27 @@ static void test_MsiSetExternalUI(void)
ret_w
=
MsiSetExternalUIW
(
handler_w
,
INSTALLLOGMODE_ERROR
,
NULL
);
ok
(
ret_w
==
NULL
,
"expected NULL, got %p
\n
"
,
ret_w
);
prev
=
(
INSTALLUI_HANDLER_RECORD
)
0xdeadbeef
;
error
=
MsiSetExternalUIRecord
(
handler_record
,
INSTALLLOGMODE_ERROR
,
NULL
,
&
prev
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
ok
(
prev
==
NULL
,
"expected NULL, got %p
\n
"
,
prev
);
ret_a
=
MsiSetExternalUIA
(
NULL
,
0
,
NULL
);
ok
(
ret_a
==
NULL
,
"expected NULL, got %p
\n
"
,
ret_a
);
ret_w
=
MsiSetExternalUIW
(
NULL
,
0
,
NULL
);
ok
(
ret_w
==
NULL
,
"expected NULL, got %p
\n
"
,
ret_w
);
prev
=
(
INSTALLUI_HANDLER_RECORD
)
0xdeadbeef
;
error
=
MsiSetExternalUIRecord
(
NULL
,
0
,
NULL
,
&
prev
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
ok
(
prev
==
handler_record
,
"expected %p, got %p
\n
"
,
handler_record
,
prev
);
error
=
MsiSetExternalUIRecord
(
handler_record
,
INSTALLLOGMODE_ERROR
,
NULL
,
NULL
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
error
=
MsiSetExternalUIRecord
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
!
error
,
"MsiSetExternalUIRecord failed %u
\n
"
,
error
);
}
START_TEST
(
install
)
...
...
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