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
8d28cc0a
Commit
8d28cc0a
authored
Oct 29, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Get rid of MSI_RecordSetStringA.
parent
9aa23c6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
26 deletions
+8
-26
record.c
dlls/msi/record.c
+8
-26
No files found.
dlls/msi/record.c
View file @
8d28cc0a
...
...
@@ -574,45 +574,27 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
return
ret
;
}
static
UINT
MSI_RecordSetStringA
(
MSIRECORD
*
rec
,
UINT
iField
,
LPCSTR
szValue
)
{
LPWSTR
str
;
TRACE
(
"%p %d %s
\n
"
,
rec
,
iField
,
debugstr_a
(
szValue
));
if
(
iField
>
rec
->
count
)
return
ERROR_INVALID_FIELD
;
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
if
(
szValue
&&
szValue
[
0
]
)
{
str
=
strdupAtoW
(
szValue
);
rec
->
fields
[
iField
].
type
=
MSIFIELD_WSTR
;
rec
->
fields
[
iField
].
u
.
szwVal
=
str
;
}
else
{
rec
->
fields
[
iField
].
type
=
MSIFIELD_NULL
;
rec
->
fields
[
iField
].
u
.
szwVal
=
NULL
;
}
return
0
;
}
UINT
WINAPI
MsiRecordSetStringA
(
MSIHANDLE
handle
,
UINT
iField
,
LPCSTR
szValue
)
{
WCHAR
*
valueW
=
NULL
;
MSIRECORD
*
rec
;
UINT
ret
;
TRACE
(
"%d %d %s
\n
"
,
handle
,
iField
,
debugstr_a
(
szValue
));
if
(
szValue
&&
!
(
valueW
=
strdupAtoW
(
szValue
)))
return
ERROR_OUTOFMEMORY
;
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
if
(
!
rec
)
{
msi_free
(
valueW
);
return
ERROR_INVALID_HANDLE
;
}
msiobj_lock
(
&
rec
->
hdr
);
ret
=
MSI_RecordSetString
A
(
rec
,
iField
,
szValue
);
ret
=
MSI_RecordSetString
W
(
rec
,
iField
,
valueW
);
msiobj_unlock
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
msi_free
(
valueW
);
return
ret
;
}
...
...
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