Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f644601f
Commit
f644601f
authored
May 24, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Improve the BindImage action stub.
parent
02fb5304
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
8 deletions
+62
-8
Makefile.in
dlls/msi/Makefile.in
+1
-1
action.c
dlls/msi/action.c
+61
-7
No files found.
dlls/msi/Makefile.in
View file @
f644601f
MODULE
=
msi.dll
IMPORTLIB
=
msi
IMPORTS
=
uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32
DELAYIMPORTS
=
odbccp32 wintrust crypt32
DELAYIMPORTS
=
odbccp32 wintrust crypt32
imagehlp
C_SRCS
=
\
action.c
\
...
...
dlls/msi/action.c
View file @
f644601f
...
...
@@ -36,6 +36,7 @@
#include "objbase.h"
#include "mscoree.h"
#include "shlwapi.h"
#include "imagehlp.h"
#include "wine/unicode.h"
#include "winver.h"
...
...
@@ -7097,7 +7098,6 @@ static UINT ACTION_MigrateFeatureStates( MSIPACKAGE *package )
{
UINT
r
;
MSIQUERY
*
view
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
0
};
...
...
@@ -7121,6 +7121,66 @@ static UINT ACTION_MigrateFeatureStates( MSIPACKAGE *package )
return
ERROR_SUCCESS
;
}
static
void
bind_image
(
const
char
*
filename
,
const
char
*
path
)
{
if
(
!
BindImageEx
(
0
,
filename
,
path
,
NULL
,
NULL
))
{
WARN
(
"failed to bind image %u
\n
"
,
GetLastError
());
}
}
static
UINT
ITERATE_BindImage
(
MSIRECORD
*
rec
,
LPVOID
param
)
{
UINT
i
;
MSIFILE
*
file
;
MSIPACKAGE
*
package
=
param
;
const
WCHAR
*
key
=
MSI_RecordGetString
(
rec
,
1
);
const
WCHAR
*
paths
=
MSI_RecordGetString
(
rec
,
2
);
char
*
filenameA
,
*
pathA
;
WCHAR
*
pathW
,
**
path_list
;
if
(
!
(
file
=
msi_get_loaded_file
(
package
,
key
)))
{
WARN
(
"file %s not found
\n
"
,
debugstr_w
(
key
));
return
ERROR_SUCCESS
;
}
if
(
!
(
filenameA
=
strdupWtoA
(
file
->
TargetPath
)))
return
ERROR_SUCCESS
;
path_list
=
msi_split_string
(
paths
,
';'
);
if
(
!
path_list
)
bind_image
(
filenameA
,
NULL
);
else
{
for
(
i
=
0
;
path_list
[
i
]
&&
path_list
[
i
][
0
];
i
++
)
{
deformat_string
(
package
,
path_list
[
i
],
&
pathW
);
if
((
pathA
=
strdupWtoA
(
pathW
)))
{
bind_image
(
filenameA
,
pathA
);
msi_free
(
pathA
);
}
msi_free
(
pathW
);
}
}
msi_free
(
path_list
);
msi_free
(
filenameA
);
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_BindImage
(
MSIPACKAGE
*
package
)
{
UINT
r
;
MSIQUERY
*
view
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'B'
,
'i'
,
'n'
,
'd'
,
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
0
};
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
==
ERROR_SUCCESS
)
{
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_BindImage
,
package
);
msiobj_release
(
&
view
->
hdr
);
}
return
ERROR_SUCCESS
;
}
static
UINT
msi_unimplemented_action_stub
(
MSIPACKAGE
*
package
,
LPCSTR
action
,
LPCWSTR
table
)
{
...
...
@@ -7145,12 +7205,6 @@ static UINT msi_unimplemented_action_stub( MSIPACKAGE *package,
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_BindImage
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
table
[]
=
{
'B'
,
'i'
,
'n'
,
'd'
,
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
0
};
return
msi_unimplemented_action_stub
(
package
,
"BindImage"
,
table
);
}
static
UINT
ACTION_IsolateComponents
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
table
[]
=
{
...
...
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