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
7d3162e6
Commit
7d3162e6
authored
Apr 21, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Abstract MSI_RecordSetStream.
parent
2b4bf44b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
msipriv.h
dlls/msi/msipriv.h
+1
-2
record.c
dlls/msi/record.c
+15
-5
No files found.
dlls/msi/msipriv.h
View file @
7d3162e6
...
...
@@ -592,8 +592,7 @@ extern UINT MSI_RecordGetStringA( MSIRECORD *, unsigned int, LPSTR, DWORD *);
extern
int
MSI_RecordGetInteger
(
MSIRECORD
*
,
unsigned
int
);
extern
UINT
MSI_RecordReadStream
(
MSIRECORD
*
,
unsigned
int
,
char
*
,
DWORD
*
);
extern
unsigned
int
MSI_RecordGetFieldCount
(
MSIRECORD
*
rec
);
extern
UINT
MSI_RecordSetStreamW
(
MSIRECORD
*
,
unsigned
int
,
LPCWSTR
);
extern
UINT
MSI_RecordSetStreamA
(
MSIRECORD
*
,
unsigned
int
,
LPCSTR
);
extern
UINT
MSI_RecordSetStream
(
MSIRECORD
*
,
unsigned
int
,
IStream
*
);
extern
UINT
MSI_RecordDataSize
(
MSIRECORD
*
,
unsigned
int
);
extern
UINT
MSI_RecordStreamToFile
(
MSIRECORD
*
,
unsigned
int
,
LPCWSTR
);
extern
UINT
MSI_RecordCopyField
(
MSIRECORD
*
,
unsigned
int
,
MSIRECORD
*
,
unsigned
int
);
...
...
dlls/msi/record.c
View file @
7d3162e6
...
...
@@ -649,7 +649,19 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
return
ERROR_SUCCESS
;
}
UINT
MSI_RecordSetStreamW
(
MSIRECORD
*
rec
,
unsigned
int
iField
,
LPCWSTR
szFilename
)
UINT
MSI_RecordSetStream
(
MSIRECORD
*
rec
,
unsigned
int
iField
,
IStream
*
stream
)
{
if
(
(
iField
==
0
)
||
(
iField
>
rec
->
count
)
)
return
ERROR_INVALID_PARAMETER
;
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
rec
->
fields
[
iField
].
type
=
MSIFIELD_STREAM
;
rec
->
fields
[
iField
].
u
.
stream
=
stream
;
return
ERROR_SUCCESS
;
}
UINT
MSI_RecordSetStreamFromFileW
(
MSIRECORD
*
rec
,
unsigned
int
iField
,
LPCWSTR
szFilename
)
{
IStream
*
stm
=
NULL
;
HRESULT
r
;
...
...
@@ -683,9 +695,7 @@ UINT MSI_RecordSetStreamW(MSIRECORD *rec, unsigned int iField, LPCWSTR szFilenam
return
r
;
/* if all's good, store it in the record */
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
rec
->
fields
[
iField
].
type
=
MSIFIELD_STREAM
;
rec
->
fields
[
iField
].
u
.
stream
=
stm
;
MSI_RecordSetStream
(
rec
,
iField
,
stm
);
}
return
ERROR_SUCCESS
;
...
...
@@ -722,7 +732,7 @@ UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, unsigned int iField, LPCWSTR s
return
ERROR_INVALID_HANDLE
;
msiobj_lock
(
&
rec
->
hdr
);
ret
=
MSI_RecordSetStreamW
(
rec
,
iField
,
szFilename
);
ret
=
MSI_RecordSetStream
FromFile
W
(
rec
,
iField
,
szFilename
);
msiobj_unlock
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
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