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
b532c0c3
Commit
b532c0c3
authored
Feb 24, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Simplify MsiSourceListAddMediaDisk.
parent
d3b37385
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
24 deletions
+14
-24
source.c
dlls/msi/source.c
+14
-24
No files found.
dlls/msi/source.c
View file @
b532c0c3
...
...
@@ -979,13 +979,12 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
UINT
rc
;
WCHAR
szIndex
[
10
];
WCHAR
squished_pc
[
GUID_SIZE
];
static
const
WCHAR
fmt
[]
=
{
'%'
,
'i'
,
0
};
static
const
WCHAR
disk_fmt
[]
=
{
'%'
,
's'
,
';'
,
'%'
,
's'
,
0
};
static
const
WCHAR
empty
[
1
]
=
{
0
};
LPCWSTR
pt1
,
pt2
;
LPWSTR
buffer
;
DWORD
size
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
'i'
,
0
};
static
const
WCHAR
semicolon
[]
=
{
';'
,
0
};
TRACE
(
"%s %s %x %x %i %s %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
dwDiskId
,
debugstr_w
(
szVolumeLabel
),
debugstr_w
(
szDiskPrompt
));
...
...
@@ -1012,33 +1011,24 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
OpenMediaSubkey
(
sourcekey
,
&
mediakey
,
TRUE
);
OpenMediaSubkey
(
sourcekey
,
&
mediakey
,
TRUE
);
sprintfW
(
szIndex
,
fmt
,
dwDiskId
);
sprintfW
(
szIndex
,
fmt
,
dwDiskId
);
size
=
2
;
if
(
szVolumeLabel
)
{
size
+=
lstrlenW
(
szVolumeLabel
);
pt1
=
szVolumeLabel
;
}
else
pt1
=
empty
;
if
(
szDiskPrompt
)
{
size
+=
lstrlenW
(
szDiskPrompt
);
pt2
=
szDiskPrompt
;
}
else
pt2
=
empty
;
size
*=
sizeof
(
WCHAR
);
if
(
szVolumeLabel
)
size
+=
lstrlenW
(
szVolumeLabel
);
if
(
szDiskPrompt
)
size
+=
lstrlenW
(
szDiskPrompt
);
size
*=
sizeof
(
WCHAR
);
buffer
=
msi_alloc
(
size
);
sprintfW
(
buffer
,
disk_fmt
,
pt1
,
pt2
);
*
buffer
=
'\0'
;
if
(
szVolumeLabel
)
lstrcpyW
(
buffer
,
szVolumeLabel
);
lstrcatW
(
buffer
,
semicolon
);
if
(
szDiskPrompt
)
lstrcatW
(
buffer
,
szDiskPrompt
);
RegSetValueExW
(
mediakey
,
szIndex
,
0
,
REG_SZ
,
(
LPBYTE
)
buffer
,
size
);
msi_free
(
buffer
);
msi_free
(
buffer
);
RegCloseKey
(
sourcekey
);
RegCloseKey
(
mediakey
);
...
...
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