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
6607180f
Commit
6607180f
authored
Apr 18, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Simplify create_component_advertise_string() a little.
parent
50a9c208
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
33 deletions
+19
-33
helpers.c
dlls/msi/helpers.c
+19
-33
No files found.
dlls/msi/helpers.c
View file @
6607180f
...
...
@@ -869,49 +869,35 @@ void reduce_to_shortfilename(WCHAR* filename)
LPWSTR
create_component_advertise_string
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
component
,
LPCWSTR
feature
)
{
GUID
clsid
;
WCHAR
productid_85
[
21
];
WCHAR
component_85
[
21
];
/*
* I have a fair bit of confusion as to when a < is used and when a > is
* used. I do not think i have it right...
*
* Ok it appears that the > is used if there is a guid for the compoenent
* and the < is used if not.
*/
static
const
WCHAR
fmt1
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
'<'
,
0
,
0
};
static
const
WCHAR
fmt2
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
'>'
,
'%'
,
's'
,
0
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
'%'
,
'c'
,
'%'
,
's'
,
0
};
WCHAR
productid_85
[
21
],
component_85
[
21
];
LPWSTR
output
=
NULL
;
DWORD
sz
=
0
;
GUID
clsid
;
/* > is used if there is a component GUID and < if not. */
memset
(
productid_85
,
0
,
sizeof
(
productid_85
))
;
memset
(
component_85
,
0
,
sizeof
(
component_85
))
;
productid_85
[
0
]
=
0
;
component_85
[
0
]
=
0
;
CLSIDFromString
(
package
->
ProductCode
,
&
clsid
);
encode_base85_guid
(
&
clsid
,
productid_85
);
encode_base85_guid
(
&
clsid
,
productid_85
);
CLSIDFromString
(
component
->
ComponentId
,
&
clsid
);
encode_base85_guid
(
&
clsid
,
component_85
);
if
(
component
)
{
CLSIDFromString
(
component
->
ComponentId
,
&
clsid
);
encode_base85_guid
(
&
clsid
,
component_85
);
}
TRACE
(
"Doing something with this... %s %s %s
\n
"
,
debugstr_w
(
productid_85
),
debugstr_w
(
feature
),
debugstr_w
(
component_85
));
TRACE
(
"prod=%s feat=%s comp=%s
\n
"
,
debugstr_w
(
productid_85
),
debugstr_w
(
feature
),
debugstr_w
(
component_85
));
sz
=
lstrlenW
(
productid_85
)
+
lstrlenW
(
feature
);
if
(
component
)
sz
+=
lstrlenW
(
component_85
);
sz
=
20
+
lstrlenW
(
feature
)
+
20
+
3
;
sz
+=
3
;
sz
*=
sizeof
(
WCHAR
);
output
=
msi_alloc
(
sz
);
memset
(
output
,
0
,
sz
);
output
=
msi_alloc_zero
(
sz
*
sizeof
(
WCHAR
));
if
(
component
)
sprintfW
(
output
,
fmt2
,
productid_85
,
feature
,
component_85
);
else
sprintfW
(
output
,
fmt1
,
productid_85
,
feature
);
sprintfW
(
output
,
fmt
,
productid_85
,
feature
,
component
?
'>'
:
'<'
,
component_85
);
return
output
;
}
...
...
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